On submit from textarea - mysql error

joost

New Member
I am using TinyMCE on my new site in english, that I am doing by myself (I am like a sunday programmer :) ). As before I was doing sites in my native language, I did not get this problem:So... when i write in the textarea a word " don't " or " doesn't " the " ' " breaks the MySQL querry and I get an error about MySQL syntax. Is there a way to go around this and allow " ' " to be saved in the database?The code for edit page looks like this\[code\]<textarea rows="12" cols="50" height="200px" name="text" ><?php echo $row['text'];?></textarea>\[/code\]And query\[code\]$sql="UPDATE works SET client='".$_POST["client"]."', description='".$_POST["description"]."', text='".$_POST["text"]."', image='".$_FILES["attels"]["name"]."' WHERE id=".$_GET['id']."";\[/code\]And also, is there a way to remove \[code\]<p>\[/code\] tag from The textarea, because tinymce automatically sets these in front of every paragraph. But I don't need them.
 
Back
Top