form validation

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
salmon
Forum Newbie
Posts: 9
Joined: Tue Jun 24, 2008 5:03 pm

form validation

Post by salmon »

I want to create a PHP form validation. I've looked at a few but none have what I'm looking for.

Example of what I'm looking for.:

1) visitor fills out form (form.php)

2) upon submit, information get's put through validation (validation.php)..

- if all required fields have been filled in, redirect to process page (formProcess.php) where information is sent to database etc..

- if all required fields have NOT been filled in, redirect to original page (form.php), fields that have been filled in should still retain that information. Any fields that need to be filled in are highlighted and an error message appears at the top of the page.
User avatar
Frozenlight777
Forum Commoner
Posts: 75
Joined: Wed May 28, 2008 12:59 pm

Re: form validation

Post by Frozenlight777 »

This is very very basic. I hope you're not relying on someone writing you a simple form. Look at the http://www.w3schools.com/php/php_forms.asp then once you have a form and validation file post what you come up with. Then perhaps you go move to javascript/php validation.
Post Reply