I have everything set up, and this works, but I can't add ' or any other punctuation without getting a MySQL syntax error when I hit submit. I want to know how I can add punctuation to the text row of my form. I have it set up to utf8_unicode_ci under Collation, but I still get a syntax error.
The textarea is where I want to be able to submit with any punctuation or character. Here's what I have.
This is the form I'm using
print "<form method=post action=reply.php>";
print "<h3>Reply:</h3>";
print "<br><textarea name=reply_content textarea rows=4 cols=50></textarea>";
print "<input type=hidden name=reply_user value={$_SESSION['user_name']}>";
print "<input type=hidden name=topic_id value=$id>";
print "<br><input type=submit></form>";
This is the SQL for reply.php
$reply_content=$_POST['reply_content'];
$reply_time=date('Y-m-d H:i:s');
$reply_user=$_POST['reply_user'];
$topic_id=$_POST['topic_id'];
mysql_query("INSERT INTO reply VALUES ('reply_id', '$reply_user', '$reply_content', '$reply_time', '$topic_id')") OR die(mysql_error());
print "<center><h1>Reply Posted Successfully</h1>";
I know there's a way to do this, I just don't know how. If anyone could help me out, I'd really appreciate it!