> Hi, I have a developed a simple Helpdesk for our small company. When users > log calls they get an alert message warning them that they must fill in all > the fields if they have missed a field. At the moment if they happen to > forget a field, they receive the alert message, but then have to start all > over again. How do I keep the existing data in the textareas from > dissapearing after the alert message?
Well, when they submit the form, whatever they typed is going to be in $_POST['name_of_textarea'], right? (or $_GET...) To put that value back into a textarea, do something like this: <textarea name="whatever"><?php if(isset($_POST['whatever'])) { echo $_POST['whatever']; } ?></textarea> I'll assume you use the same form for entering if there is an error. the first time this form is displayed, $_POST['whatever'] will not be set, so the <textarea> will be blank. After it's submitted, then the value will be filled back in. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php