Error using forms
Posted: Wed Oct 05, 2011 4:52 pm
I have a script that allows a person to fill out a basic form then it inserts the info into the database. However if the person uses quotation marks in their text it throws an error.
I know there is a way to fix it, however I can't remember what that is.
Here is the insert script. Can you remind me what I am missing that will allow quotation marks ?
I know there is a way to fix it, however I can't remember what that is.
Here is the insert script. Can you remind me what I am missing that will allow quotation marks ?
Code: Select all
$Title = $_POST['Title'];
$text = $_POST['text'];
$insert = mysql_query("INSERT INTO `story` (`id_`,`Title`, `username`, `date`, `text`) VALUES('0', \"$Title\", '{$_COOKIE['chinclub']}', '$date', \"$text\")");