Jump to content

quotes causing errors


brem13

Recommended Posts

hey, when i type into a textbox or text area and there are single quotes ( ' ) used, i get errors for sql, i use htmlspecialchars, how can i fix this.

here is the code from the form

****************************

<textarea name="bboard" style="font-size:11px; font-family:Tahoma; width: 225px; height: 60px" rows="1" cols="20"></textarea><br />

 

here is the code that gets the post

********************************

$comment = htmlspecialchars(Trim(stripslashes($_POST['bboard'])));

Link to comment
https://forums.phpfreaks.com/topic/152126-quotes-causing-errors/
Share on other sites

Archived

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

×
×
  • Create New...

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.