Fix add wish error
This commit is contained in:
parent
4315957957
commit
e96edb4880
1 changed files with 11 additions and 5 deletions
|
@ -52,6 +52,12 @@ switch ($_SERVER['REQUEST_METHOD']) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$wishlist_id = $_POST['wishlist_id'];
|
||||||
|
$wish_title = trim($_POST['wish_title']);
|
||||||
|
$wish_description = $_POST['wish_description'] ?: 'NULL';
|
||||||
|
$wish_url = trim($_POST['wish_url']);
|
||||||
|
$wish_priority = $_POST['wish_priority'] ?: 'NULL';
|
||||||
|
|
||||||
$database->query('INSERT INTO `wishes`
|
$database->query('INSERT INTO `wishes`
|
||||||
(
|
(
|
||||||
`wishlist`,
|
`wishlist`,
|
||||||
|
@ -60,11 +66,11 @@ switch ($_SERVER['REQUEST_METHOD']) {
|
||||||
`url`,
|
`url`,
|
||||||
`priority`
|
`priority`
|
||||||
) VALUES ('
|
) VALUES ('
|
||||||
. $_POST['wishlist_id'] . ',
|
. $wishlist_id . ',
|
||||||
"' . trim($_POST['wish_title']) . '",
|
"' . $wish_title . '",
|
||||||
"' . trim($_POST['wish_description']) . '",
|
"' . $wish_description . '",
|
||||||
"' . trim($_POST['wish_url']) . '",
|
"' . $wish_url . '",
|
||||||
' . trim($_POST['wish_priority']) . '
|
' . $wish_priority . '
|
||||||
)
|
)
|
||||||
;');
|
;');
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue