Forum Moderators: coopster

Message Too Old, No Replies

MySQL data not redisplaying in TEXTAREA

         

m8fyu

12:00 pm on Aug 30, 2010 (gmt 0)

10+ Year Member



I've been stuck now for hours trying to figure out why when I am unable redisplay my data from my database inside my update form. It seems to depend whether I use input type of 'text' or 'textarea'.

For example, where I use a input type of text the data is pulled from the database and displayed back on my page

<label for='max_guests' class='left'>Max. guests</label>
<input type='text' name='ud_guests' id='ud_guests' class='field' value='<? echo "$guests"?>' tabindex='3' />

However, where I use textarea, I don't get the required the same result. The field is just blank.

<label for='meta_descr' class='left'>Meta desc:</label>
<textarea name='ud_meta_descr' id='meta_descr' cols='45' rows='5' tabindex='8' value='<? echo "$meta_descr" ?>' /></textarea>

Its driving me nuts. Can anyone suggest what I can do to remedy this? I suspect its a syntax error as my PHP knowledge is limited. However I am referring to a tutorial.

Any suggestions would be greatly appreciated

optik

12:18 pm on Aug 30, 2010 (gmt 0)

10+ Year Member



You don't set the content of a text area with the value attribute, you need to place the echo between the textarea tags.

m8fyu

12:38 pm on Aug 30, 2010 (gmt 0)

10+ Year Member



Optik, you are a diamond. Thank you so much for your help.

Next question...how can I mark this as resolved?

Thanks again