Jump to content

[SOLVED] Filling Textbox value which contains quotes


rohithreddyk

Recommended Posts

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

 

 

 

 

 

 

 

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.