Advantage is obvious! If there is a field user didn't fill up, you can notify user about it and ask him/her to fill the field up.
Do the math: Validating after send: 1. Fill in the form 2. Send 3. (Load) 4. Validate - It failed = back to form 5. (Load) 6. Pre-fill the fields up with previous values Repeat 1 to 6 untill user gets everything right 7. Do what you want with form data Validating before send: 1. Fill in the form 2. Validate - It failed = info to user if something failed Repeat 1 and 2 untill user gets everything right 3. Send 4. (Load) 5. Do what you want with form data Ofcourse this does not apply to every form, but basicly this is how it goes. Niklas -----Original Message----- From: Liam Gibbs [mailto:[EMAIL PROTECTED] Sent: 7. maaliskuuta 2003 15:55 To: php list Subject: Re: [PHP] javascript > If you want to validate form data before sending it, javascript is the > choise. Yeah, before sending it. Just wondering what the advantage is in validating before sending. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ########################################### This message has been scanned by F-Secure Anti-Virus for Internet Mail. For more information, connect to http://www.F-Secure.com/ ########################################### This message has been scanned by F-Secure Anti-Virus for Internet Mail. For more information, connect to http://www.F-Secure.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php