I have a problem in my Forum Error message always when I write like I'm or don't it is the ' The error message is: I wrote in the I'm test PHP Code: $a_name=$_POST['a_name']; $a_email=$_POST['a_email']; $a_answer=$_POST['a_answer']; $p=$_POST['p']; $ip = $_SERVER['REMOTE_ADDR']; // Insert answer mysql_query("UPDATE cat SET last=unix_timestamp() WHERE id='$cat'"); mysql_query("UPDATE forum_question SET lastuser='$signin_username' WHERE id='$id'"); $result2=mysql_query("INSERT INTO forum_answer(question_id, a_id, a_name, a_email, a_answer, a_datetime, ip)VALUES('$id', '$Max_id', '$a_name', '$a_email', '$a_answer', unix_timestamp(), '$ip')")or die (mysql_error()); PHP:
you have to use addslashes for instance: $a_answer= addslashes($_POST['a_answer']); that should solve the ' problem. Also don't forget to use stripslashes when you are showing the data