DJTim666 Posted December 16, 2007 Share Posted December 16, 2007 I am outputting information in a text box the following way; <?php $findInfo = mysql_query ("SELECT * FROM `table_name` WHERE `id` = '$var'"); $row = mysql_fetch_array ( $findInfo ); echo "<form action='somescript.php' method='post'> <input type='text' name='title' value='" . stripslashes ( $row['title'] ) . "' /> </form>"; ?> Now when I output using stripslashes(or no stripslashes) I can't see the whole topic name because it is cut off when someone has a ' in the topic. Is there any other way to output something so the users will see just a single quote without the backslash? -- DJ Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted December 16, 2007 Share Posted December 16, 2007 You also need to use htmlentities() so that things like quotes are treated as literal characters instead of being interpreted by the bowser. Quote Link to comment Share on other sites More sharing options...
DJTim666 Posted December 16, 2007 Author Share Posted December 16, 2007 Hmm, that still doesn't work. I only get the message up til the quote . Quote Link to comment 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.