Jump to content

Archived

This topic is now archived and is closed to further replies.

PakiGangsta

When i create a news why does

Recommended Posts

[!--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]

Share this post


Link to post
Share on other sites
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());

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.