Re: forms checking

From: Date: Wed, 19 Jul 2000 17:09:16 +0000
Subject: Re: forms checking
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-7314@lists.php.net to get a copy of this message
""Erb, Maria"" <merb@keene.edu> wrote in message news:CFD3579B7DE2D111A7C000805F9F61AD0162A93C@dinsmore.keene.edu... > hi, > > is there a way with PHP to check fields in a form to make sure they aren't > blank before submitting the form? Can you call a function to execute when a > form is submitted like you can with JavaScript? Or are there event handlers > like OnClick or OnBlur? Or even, can you use JavaScript functions with PHP? > JavaScript is clientside and serverside (using ASP, or so I've been told). Which do you mean? PHP is a serverside language. There are no event handlers because PHP doesn't execute on the client side (in the browser) like JavaScript does. PHP can validate forms, but only after the form is submitted. Yes, you can use JavaScript with PHP, as well as VBScript, Java and any other language that can run on the client. They're symbiotic, but not interdependent. That's like asking if you can use Perl with JavaScript. -- O.

« previous php.general (#7314) next »