Sorrow Posted August 29, 2008 Share Posted August 29, 2008 Hello guys here is my problem. When i get the information from the database and put it in a <textarea> to modify it, every time there is the apostrophe ' sign everything after the sign doesn't show up ex: "Phpfreak's website is cool" the output that i get is "Phpfreak". How can I get the entire text to show?? Here's my code: <?php include 'opendb.php'; $currIndex = $_GET['index']; $query = "SELECT * FROM Trailers where T_index = $currIndex"; $result = mysql_query($query); while($row = mysql_fetch_array($result, MYSQL_ASSOC)) { echo " <form action='process_modificationT.php?index=$currIndex' method='post'><table border = '0' ><tr> <td> Movie Title: <td> <input name='TTitle' type='text' size='50' value = '{$row['T_Title']}'> <br><tr> <td> Synopsis :<td> <textarea name='TSynopsis' cols='100' rows='10'>{$row['T_Synopsis']}</textarea><tr> <td>Movie Case Link: <td> <input name='TCase' type='text' size='100' value = '{$row['T_Case']}'> <br /><tr> <td>Trailer Link: <td> <input name='TLink' type='text' size='100' value = '{$row['T_Link']}'> <br /><tr> <td> <td><td><input type='submit' align='right' value='Modify Trailer'> </table> </form> "; Quote Link to comment Share on other sites More sharing options...
webref.eu Posted August 29, 2008 Share Posted August 29, 2008 Use of htmlspecialchars will convert the ' into its html entity equivalent and prevent the ' within your data cutting the field off: <textarea name='TSynopsis' cols='100' rows='10'>htmlspecialchars($row['T_Synopsis'])</textarea> Quote Link to comment Share on other sites More sharing options...
Sorrow Posted August 29, 2008 Author Share Posted August 29, 2008 I tried to put in the line of code you just gave me but the only thing that it does is putting "htmlspecialchars" in front of the text that it gets from database ex:htmlspecialcharsPhpfreak's website is cool Quote Link to comment Share on other sites More sharing options...
DeanWhitehouse Posted August 29, 2008 Share Posted August 29, 2008 can you show how you are doing htmlspecialchars? Quote Link to comment Share on other sites More sharing options...
webref.eu Posted August 29, 2008 Share Posted August 29, 2008 It's your curly brackets that I'm unfamiliar with ... anyway, it's something to do with them, maybe try: <textarea name='TSynopsis' cols='100' rows='10'>htmlspecialchars({$row['T_Synopsis']})</textarea> Rgds Quote Link to comment Share on other sites More sharing options...
Sorrow Posted September 1, 2008 Author Share Posted September 1, 2008 still not working Quote Link to comment Share on other sites More sharing options...
Sorrow Posted September 1, 2008 Author Share Posted September 1, 2008 sorry i just noticed that it is working but it is displaying the htmlspecialchars (). How do I go for not having it displayed and I cant figure out how to use the htmlspecialchars within an <input value="title"> 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.