Posted by J.O. Aho on 12/01/06 07:32
d88pak@gmail.com wrote:
> Hi,
>
> I am new to PHP and trying to develop simple web application using php
> but I can't figure out how to retain the text in textarea. For the text
> boxes I was able to retain the text (in case user makes the mistakes in
> filling up the form and telling them to correct the mistaken fields)
> but text in textarea get completely erased. Is there a way to do this?
> <textarea cols="50" rows="5" name="descr" value="<?php echo
> $_POST['descr']?>"></textarea>
> this doesn't work for text area
> ===========================
>
> Please can somebody tell me how to achieve this?
This isn't a PHP error, but HTML error, textarea don't have a value-option,
the text you want pre-inserted has to be between the open-tag and close-tag
<textarea cols="50" rows="5" name="descr"><?php echo $_POST['descr'];
?></textarea>
//Aho
[Back to original message]
|