Daniel, Rather than sending them to a new page to validate the form and then sending them back if a field is invalid, do the error checking from the same script.
Here's an example, a bit simple but just to give you an idea. For a better explanation, you should read this article which elaborates on this method: http://www.zend.com/zend/spotlight/form-pro-php4.php <?php if($HTTP_POST_VARS){ // check for required fields if(!HTTP_POST_VARS['name'] || !HTTP_POST_VARS['email']) $error_message = 'You did not provide all required fields' } // any other error checking you want to do .... ?> <?php // if error, print out error message if($error_message){ echo $error_message; } ?> <FORM METHOD="post" ACTION="<?php echo $PHP_SELF ?>"> <INPUT TYPE="text" NAME="name" SIZE="20" VALUE="<?php echo $HTTP_POST_VARS['name'] ?>"> <INPUT TYPE="text" NAME="email" SIZE="20" VALUE="<?php echo $HTTP_POST_VARS['email'] ?>"> and so on.... <INPUT TYPE="submit" NAME="process_form" VALUE="Submit"> -----Original Message----- From: Daniel J. Rychlik [mailto:[EMAIL PROTECTED] Sent: Thursday, June 12, 2003 2:40 PM To: [EMAIL PROTECTED] Subject: [PHP] $_SESSION as $key=>$value Is this valid to iterate over a form variables.? foreach ($_SESSION as $key=>$value) and another question, do I need this <form action="scripts/process.php" method="post"> in my form? Im really struggling with $_SESSION. Im trying to program smarter and make friendlier applications. Ive submitted several emails dealing with this function and I apologize for beating a dead horse, so to speak. I have a form with a few form fields. Im working on an error function that will take the data that was entered and pass it back to the form so that the user will not have to input the data again. If an error is found I use the header function to go back to the form. Im having trouble with passing back the data. Do I in my form setup a $_GET or should I use the $_SESSION to call it. I am also going to setup a few css styles that highlight which field was found in error. Again, I apologize for my lack of vision and maybe a spark of light will go off, and I will be able to make some connections to get this done. Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php