This is my code:
I have repaced the users, pw en database. The connection is not a problem Buth i get always this error.
I work with the ckeditor…
why it don’t works ???
This is my code:
echo "Make Connection ";
$conn = mysql_connect(‘localhost’, ‘aaaat’,‘bbbb’,‘ccc’) or die(“Database is not connected”);
echo " End Connection";$title = trim($_POST[“title”]);
$body = $_POST[“myeditor”];
//$body = mysql_real_escape_string($_POST[“myeditor”]);
echo $body;
$date = date(“d M, Y H:i:s”);
echo "Dit is de SQL: ==> ";
$sql = “INSERT INTO ‘WebisteTekst’ (body) VALUES (’$body’)”;//$sql = “INSERT INTO ‘WebisteTekst’ VALUES(’’,’$title’,’$body’,’$date’)”;
echo $sql;
echo “”;
if (!mysql_query($sql,$conn))
{
die(‘Error in querry.’ . mysql_error());
}
echo “record added”;
mysql_close($conn)
I get the next result
Make Connection
End Connection
Pakher! We are building a simple editor.
Dit is de SQL: ==> INSERT INTO ‘WebisteTekst’ (body) VALUES (’
Pakher! We are building a simple editor.
')
Error in querry.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 ‘‘WebisteTekst’ (body) VALUES (’Pakher! We are building a simple editor.
’ at line 1