-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi.php
More file actions
35 lines (28 loc) · 711 Bytes
/
api.php
File metadata and controls
35 lines (28 loc) · 711 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
include($_SERVER['DOCUMENT_ROOT'] . "/includes/inc-db-connection.php");
include($_SERVER['DOCUMENT_ROOT'] . "/includes/inc-functions.php");
?>
<?php
if (isset($_POST['uploadPAA'])) {
try
{
$i = DB::getInstance()->insert(
'posts',
[
'post_category_id' => 16,
'post_member_id' => 2,
'post_title' => htmlspecialchars(strip_tags($_GET['seed'])),
'post_body' => $_GET['body'],
'post_seo_title' => "",
'post_seo_description' => "",
'post_image' => "",
'post_image_alt_text' => "",
'post_status' => "published",
'post_source_url' => "",
'post_date' => date('Y-m-d H:i:s')
]);
} catch (Exception $e) {
echo $e->getMessage();
}
}
?>