Javascript & php
| From: | kaab kaoutar | Date: | Thu, 01 Mar 2001 18:00:04 +0000 |
| Subject: | Javascript & php | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-42201@lists.php.net to get a copy of this message | ||
Thanks!
Does it mean that there is no way to execute a php statement
after the click of a button ? then go to the other page mentionned in the form action ?
From: "Johnson, Kirk" <kjohnson@zootweb.com> To: "'kaab kaoutar'" <kaab_k@hotmail.com> Subject: RE: [PHP] pleaaaaaaaase help! Date: Thu, 1 Mar 2001 10:47:58 -0700 Jason Jacobs has the right idea. Put the PHP code that you want to run in a 2nd file, for example, myScriptFile.php. Put this file name in the "ACTION" attribute of your <FORM> tag in your first file. Then, when the user clicks the "Submit" button in the first file, myScriptFile.php gets executed. Say your first file is named myForm.php and it contains the <FORM>. In this file put: <FORM METHOD = "post" ACTION = "myScriptFile.php"> <INPUT TYPE = "submit"> Put your PHP code in the file named myScriptFile.php. You see, you have to hit the server again to run the PHP code. If you want the code to run in *real time without leaving the first page* (myForm.php), you need to use JavaScript to do that. -----Original Message----- From: kaab kaoutar [mailto:kaab_k@hotmail.com] Sent: Thursday, March 01, 2001 10:23 AM To: Johnson, Kirk Subject: RE: [PHP] pleaaaaaaaase help! I don't get what u mean ! i know that one is client side and the other server side! From: "Johnson, Kirk" <kjohnson@zootweb.com> To: "'kaab kaoutar'" <kaab_k@hotmail.com> Subject: RE: [PHP] pleaaaaaaaase help! Date: Thu, 1 Mar 2001 10:01:47 -0700 Not without hitting the server! PHP works on the server side, JavaScript works on the client side. -----Original Message----- From: kaab kaoutar [mailto:kaab_k@hotmail.com] Sent: Thursday, March 01, 2001 9:59 AM To: php-general@lists.php.net Subject: [PHP] pleaaaaaaaase help! Hi! please i'm really in need of knowing if there is a way to do a php statement once a button is clicked!_________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.