Re: using html forms and php scripts
| From: | Niklas Brunlid | Date: | Tue, 08 Aug 2000 15:09:56 +0000 |
| Subject: | Re: using html forms and php scripts | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-10686@lists.php.net to get a copy of this message | ||
Eelco de Graaff wrote:
>
> Hi There,
> Recently i noticed the folowing and was a bit surprised:
>
> When i had created a html form outsite the php script and continued with the
> php script, the script was running further without waiting for the POST from
> the form. Is this normal? Do i need to create a wait loop to wait until the
> post or the cancel is made when i work with php and html forms?
>
> <? php part of the script
> ?>
> html part of the script with the form
> ?>rest of the php script
It's normal. PHP outputs a _web page_ that the browser interprets, i.e.
it offers no interaction within one run of your script. You won't get
any input from the form until the user submits it, whereby another web
page (usually another php script, or the same with different code
depending on wether it genererates or interprets the form data) gets the
data.
OK, so you can use JavaScript to interpret the data in the browser, but
that's something you don't have 100% control over.