rohithreddyk Posted May 21, 2009 Share Posted May 21, 2009 Hi, I am very new to PHP.. I am building a website as part of my course work...I am facing a problem and not finding any solution for that.. I have a table which contains all the tasks need to be done by a user..last column is "comments"..user can update the table records..in the edit.php page where user can edit the details, I am supposed to show the precious comments,if any, so that the user know if there are any comments. So for that, I am using this code <td><input type='text' name='Comments' value='<?=$row[7];?>' ></td> //text box is inside a table cell..$row=mysql_fetch_row(blabalaaaa)..........and comments is 8th field in the row Thus when the user first opens the edit.php page, he sees text box filled in with existing comments and he can modify that and press submit button. The problem is, when there is existing comment as.. he's not comming to school (or) he"s not comming to school ... only part upto the quote is displayed in the text field.. I mean text field displays only.. he.. and nothing else. I know the problem is using quotes at value in <input> tag but I dont know how to solve this. if I remove that quotes then value upto first space is displayed. I mean upto (he's)..when first space encounters it ignores remaining string. very glad if anyone of you can help. Thanks in advance Quote Link to comment https://forums.phpfreaks.com/topic/159166-solved-filling-textbox-value-which-contains-quotes/ Share on other sites More sharing options...
jackpf Posted May 21, 2009 Share Posted May 21, 2009 htmlspecialchars() is probs what you want. Quote Link to comment https://forums.phpfreaks.com/topic/159166-solved-filling-textbox-value-which-contains-quotes/#findComment-839394 Share on other sites More sharing options...
rohithreddyk Posted May 21, 2009 Author Share Posted May 21, 2009 That worked thanks a lot... Quote Link to comment https://forums.phpfreaks.com/topic/159166-solved-filling-textbox-value-which-contains-quotes/#findComment-839411 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.