Re: how to use the same file...
| From: | Jeff Lacy | Date: | Mon, 27 Nov 2000 13:45:43 +0000 |
| Subject: | Re: how to use the same file... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-27360@lists.php.net to get a copy of this message | ||
I'm not quite sure what you want, but I might have an idea. In the form,
give the submit button a name, like submit. Then, in blabla.php, have
something like this:
<?php
if ($submit) {
// Form Proccessing suff goes here
}
else {
// Stuff to display form goes here
// Maybe....
echo "<form action=\"$PHP_SELF\" method=\"POST\">
<input type=\"submit\" name=\"submit\" value=\"Submit this dumb
form!!!\">";
}
?>
"Christian Dechery" <lemming@vento.com.br> wrote in message
news:5.0.0.25.2.20001125120836.023eb330@pop-gw.vento.com.br...
> How do I get PHP to build a form and process it in the same blabla.php???
>
> like... if you go to
> "http://www.somewhere.com/blabla.php"
>
> it would only show the form to fill up, and the form action would be
> "blabla.php"... it's that PHP_SELF stuff right?
> but how can I tell if there where no GET parameters... should I check
> QUERY_STRING or is there a better way of doing it?
> ____________________________
> . Christian Dechery (lemming)
> . http://www.tanamesa.com.br
> . Gaita-L Owner / Web Developer
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>