hello all i am having a project where a user can write any comment on any post currently everything is going very good i mean that the user can post and comment successfully but when the user comments any line which contains any single or double quote the whole text is just skipped nothing is displayed . like the text i'll call you is not displayed but i will call you is displayed i know i need to use addslashes but i don't know how to use it. i tried to addslashe after the post variable and then send it to database bit nothing happens
here is my form and code
JS
function formsubmitionbyajax(obj){
$.ajax({ type: 'post',
url: 'home_formhandler1.php',
data: $("#postform").serialize(),
success: function(){
$("#LOADreftraed").load("Mypage.php #LOADreftraed");
$("#postform")[0].reset();
} } ); return false; }
PHP action page
$views=$_POST['views'];
$comment=$_POST['comment'];
$onid=$_POST['onid'];
$onemail=$_POST['onemail'];
$insertposts=mysql_query("insert into `fk_views` (`views`,`session_id`,`email`,`Date`)
values ('$views','$sid','$email','$time')");
exit;
i have many forms like this and is there any way to addslash to all the post variables and then send them to BD please help me .