PakiGangsta Posted June 15, 2006 Share Posted June 15, 2006 the rn come up when you hit enter :( do not know why Quote Link to comment https://forums.phpfreaks.com/topic/12049-when-i-create-a-news-why-does/ Share on other sites More sharing options...
phpvolution Posted June 15, 2006 Share Posted June 15, 2006 Do you have code you can paste? Quote Link to comment https://forums.phpfreaks.com/topic/12049-when-i-create-a-news-why-does/#findComment-45811 Share on other sites More sharing options...
PakiGangsta Posted June 15, 2006 Author Share Posted June 15, 2006 [!--quoteo(post=384086:date=Jun 15 2006, 01:43 AM:name=phpvolution)--][div class=\'quotetop\']QUOTE(phpvolution @ Jun 15 2006, 01:43 AM) [snapback]384086[/snapback][/div][div class=\'quotemain\'][!--quotec--]Do you have code you can paste?[/quote][code]$title=strip_tags($title); $post=strip_tags($post); $post = stripslashes($post); $posting="INSERT INTO news (title,user,message,day) values ('$title', '$userdata[username]','$post','$day')"; mysql_query($posting) or die("could not post");[/code] Quote Link to comment https://forums.phpfreaks.com/topic/12049-when-i-create-a-news-why-does/#findComment-45817 Share on other sites More sharing options...
joquius Posted June 15, 2006 Share Posted June 15, 2006 two things:stripslashes? you need to add slashes. Use mysql_real_escape_string() for that.and you should add mysql_error() here:mysql_query($posting) or die("could not post: ".mysql_error()); Quote Link to comment https://forums.phpfreaks.com/topic/12049-when-i-create-a-news-why-does/#findComment-45823 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.