Passing values back to form
| From: | Daniel J. Rychlik | Date: | Thu, 05 Jun 2003 16:31:07 +0000 |
| Subject: | Passing values back to form | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-150376@lists.php.net to get a copy of this message | ||
Im new to PHP coming from a background in perl devlopement. I have a form that a user can fill out.
On submit the values are iterated over a foreach to check for empty(). If the an emtyp $key is
found then it passes an error string to my error function.
I have 2 php files, one that is the Form called profile.php and one that processes the values from
the form, called profileprocess.php. There are multiple functions in profileprocess.php. When the
header function is called in the profileprocess.php it takes you back to the profile.php with empty
values in the fields. I was wandering if their is a way, (which Im sure their is) to pass back all
the data that was correctly entered back to the form, and then a nice little message that displays
the error of the data that needs to be checked by the user. I could do this a number of ways, but
the key is not writing code that you dont have to. Its just smarter programming.
Any ideas, or functions I could read on in the rtFM manual is greatly appreciated.
I appreciate you looking at this problem...
Thanks in advance,
Daniel