Re: calling php function when submit button is pressed

From: Date: Mon, 14 Feb 2005 16:41:03 +0000
Subject: Re: calling php function when submit button is pressed
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-208647@lists.php.net to get a copy of this message
ross@aztechost.com wrote:
Can anyone show me how to call a function when submit is pressed or a form is submitted.
"When submit is pressed"... as in instantly / on the web browser's side? You need Javascript for that; PHP simply won't do that. Or did you mean "when a form gets posted to the server"? Because you can run just about anything in the target script when it receives a $_POST['your_submit'] value...
I am for an alternative to $php_self which refreshes the whole page. I want to run the function which displays the errors on a form and only do a $php_self when the form is filled out correctly.
Based on this, sounds like you want some Javascript to do the error checking.
thanks Ross
-- Teach a man to fish... NEW? | http://www.catb.org/~esr/faqs/smart-questions.html STFA | http://marc.theaimsgroup.com/?l=php-general&w=2 STFM | http://www.php.net/manual/en/index.php STFW | http://www.google.com/search?q=php LAZY | http://mycroft.mozdev.org/download.html?name=PHP&submitform=Find+search+plugins

Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
« previous php.general (#208647) next »