Assuming you know what your field names are, they get passed in to the PHP 
script as variables.

Using regular expressions you can check your variables for values you 
want/don't want. If they aren't what you want print an error message and tell 
the user to go back or something similar.

It's the same process as doing it with Javascript, except its after the user 
hits submit.


On Monday 29 October 2001 11:44, Jason wrote:

>  I am new to php and I have been using a book to learn a bit about it and
>  well I could not find a chapter on how to use php to verify a form is
> filled out properly, for instance I have a form with 3 fields... name,
> email and words. once the user clicks the submit button i want it to verify
> those 3 fields before running the php script to pass the info to a
> database. I have used java-script for this function in the past but would
> like to use php. Anyone know how i can accomplish this? Thanks in advance,
> Jason


Henrik Hudson

PHP General Mailing List (
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