Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Input validation

Status
Not open for further replies.

OldSmelly

Programmer
Nov 22, 2001
70
NL
Hi all,

I have a form where the user can input some data ie name adress etc. It works great but I wan't to do some validation like teh name field must be filled out. If a user press submit then a warning should be given preff without leaving the form.

Is this posible and how ?

Thanks

Hans
 
That wouldn't be PHP then, but client-side Javascript. That's

forum216

I'd recommend you do a Google search for "javascript form validation" first and see what you can find there.

Lee
 
Trollacious si right, if you want to validate the form without leaving its Javascript territory.

However if you don't mind having the the form subitted, then trhe validation can be done in PHP, and it would return the browser to the form in the event something is not filled out.



----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top