RE: [PHP] PHP_SELF
| From: | Johnson, Kirk | Date: | Mon, 30 Jul 2001 22:48:13 +0000 |
| Subject: | RE: [PHP] PHP_SELF | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-60288@lists.php.net to get a copy of this message | ||
>Ideal scenario, a blank form is presented to the
> user, and when
> the form is submitted, do the logic check and act accordingly. Is it
> possible using $PHP_SELF as the target, or do I have to use 2
> files: a
> form 'front end' with the php logic in the 'backend'??
Yes, this is possible, and commonly done. Just add some logic to determine
if the page is being displayed for the first time, or, if it is being posted
to. An easy way to check this is to see if $HTTP_POST_VARS[] has any
elements. If it does, the form has been posted, so process the form data.
Kirk