views:

17

answers:

1

In case a user forgets to enter an input area or enters an invalid code, and then comes back to the page where the users was filling a form, then he/she will face that his/her textarea is empty. And won't want to fill it again. I want from the browser to remember what was written in it. How I'll do that?

<textarea cols="60" name="event" rows="20"></textarea>

(Yes I can validate with javascript the email-name etc areas before the send button but I was unable to validate the captcha by a javasript)

+2  A: 

If you are using PHP in server side and form have method="POST":

<textarea cols="60" name="event" rows="20"><? echo $_POST['event'] ?></textarea>

Or if you textarea have any text typed by default:

<textarea cols="60" name="event" rows="20"><? echo (!isset($_POST['event']))?("Default textarea data."):($_POST['event']) ?></textarea>
Svisstack