Jump to content


Photo

When i create a news why does


  • Please log in to reply
3 replies to this topic

#1 PakiGangsta

PakiGangsta
  • Members
  • PipPip
  • Member
  • 28 posts

Posted 15 June 2006 - 06:15 AM

the rn come up when you hit enter :(
do not know why
The one and only KingBowser :).

#2 phpvolution

phpvolution
  • Members
  • PipPip
  • Member
  • 13 posts

Posted 15 June 2006 - 06:43 AM

Do you have code you can paste?

#3 PakiGangsta

PakiGangsta
  • Members
  • PipPip
  • Member
  • 28 posts

Posted 15 June 2006 - 07:17 AM

[!--quoteo(post=384086:date=Jun 15 2006, 01:43 AM:name=phpvolution)--][div class=\'quotetop\']QUOTE(phpvolution @ Jun 15 2006, 01:43 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Do you have code you can paste?
[/quote]
$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");

The one and only KingBowser :).

#4 joquius

joquius
  • Members
  • PipPipPip
  • Advanced Member
  • 319 posts

Posted 15 June 2006 - 07:52 AM

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());
z..z..z..z..z..z..z..z..




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users