What I did was use javascript to make sure they filled out certain parts of
the form.  I also created a php version in case they disabelled
javascripting.  The way I did this was each input do this:

<INPUT type="text" name="Username" value="<? print $Username ?>">

When they first come into the site the $Username value will be blank, but
once they have submitted the form it will now contain whatever value they
inputted.  Just do an "if" check for all the variables that you want to be
required and then a message variable that appends for each form value they
forgot to fill out and then output the message.

I hope that helps! :)

Rick

> Im trying to introduce some logic into a form.I am unsing $PHP_SELF as
> the target.
> <form action=\"$PHP_SELF\" method=\"POST\" type=\"multipart/form-data\">
> 
> I have a text area that the user inputs their age.  What I want is that
> if the field is blank, to stop the script and send the user back to fill
> in their age.  My problem now is that if I go to the blank application
> form, The script interprets the form as being blank and spits out the
> error.  Ideal scenario, a blank form is presented to the user, and when
> the form is submitted, do the logic check and act accordingly.  Is it
> possible using $PHP_SELF as the target, or do I have to use 2 files: a
> form 'front end' with the php logic in the 'backend'??
> 
> 
> if ($Age = " ") {
> echo "Please go back and enter your age."; } exit();
> 
> Thanks
> Gerard
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to