Re: Running a script to check something before submitting a form. Can this be done?

From: Date: Fri, 31 May 2002 20:56:43 +0000
Subject: Re: Running a script to check something before submitting a form. Can this be done?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-100172@lists.php.net to get a copy of this message
you will have to do this with javascript on the client side with an onClick() call in the submit button. but the bad thing is, you wont be able to check this with the mysql db, unless you load the entire field set into the current page. my suggestion would be to send the form to one single page no-matter what. do the validating and then if the email address isn't there, redirect with the php header() function to the custom page that you are talking about. Jim lucas ----- Original Message ----- From: "Don" <don@lclcan.com> To: "php list" <php-general@lists.php.net> Sent: Friday, May 31, 2002 1:46 PM Subject: [PHP] Running a script to check something before submitting a form. Can this be done? Hi, I think I need to use PHP here which is why I'm posting to this ng. I have a form that upon the user pressing submit, calls a PHP form handler. What I'd like to do is upon the user pressing submit, I need to validate an email field within a MySQL database and only if it does NOT exist, call the form handler. If it exists, I'll juets return a custom page and NOT call the form handler. I'm wondering if I need some JavaScript here? If PHP is not involved, I apologize for the post. Don

« previous php.general (#100172) next »