Closed JSMendes closed 10 years ago
Hello,
Could you post the code for that whole page here? That would help me find the error.
index.php
<?php
session_start();
if(!isset($_SESSION['username'])) { header('Location: login.php'); }
?>
<?php include('config/setup.php'); ?>
<!DOCTYPE html>
```Page could not be added because: '.mysqli_error($dbc); $message .= '
'.$q.'
'; } } ?>I already put the code in the GutHub, can you help me?
2014-04-24 21:35 GMT+01:00 The Digital Craft notifications@github.com:
Hello,
Could you post the code for that whole page here? That would help me find the error.
— Reply to this email directly or view it on GitHubhttps://github.com/thedigicraft/Atom.CMS/issues/28#issuecomment-41328793 .
Try replacing:
if (isset($_POST['id']) && $_POST['id'] != '') { //Salva a página
With this:
if(isset($_POST['id']) != ""){ //Salva a página
Make sure there is no space between the double quotes -
!= ""){ //Salva a página
The way you have it may also work with double quotes instead of single quotes.
You're missing a single quote after:
label = '$label',
Try this:
if(isset($_POST['id']) != ""){ //Salva a página
$q = "UPDATE pages SET user = $_POST[user], slug = '$slug', label = '$label', title = '$title', header = '$header', body = '$body' WHERE id = $_GET[id]";
Many thanks for the help PHPCLUE, I was already going crazy searching for the problem and were actually single quote ... omg very bad on my part, lack of attention = /
Hey thanks PHPCLUE! I have been extremely busy over the last couple weeks. I appreciate your help with this! :-)
Hello, i'm having problems in the save page, get following error:
Page could not be updated because: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near (...).
I already put this:
if (isset($_POST['id']) && $_POST['id'] != '') {
but the error still gos on.. can you help me pls?