PakiGangsta Posted June 15, 2006 Share Posted June 15, 2006 the rn come up when you hit enter :( do not know why 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? 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] 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()); 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
Archived
This topic is now archived and is closed to further replies.