Re: Forms and Results with PHP
| From: | Chris Noble | Date: | Thu, 06 Dec 2001 22:22:21 +0000 |
| Subject: | Re: Forms and Results with PHP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-76957@lists.php.net to get a copy of this message | ||
Have it check to see if the submit button has been clicked. such as the name
attribute you use on it. like
if(!isset($HTTP_POST_VARS[submit]))
{
header("Location: formpage.php");
}
Chris N.
"Ben Clumeck" <bclumeck@home.com> wrote in message
news:NFBBJJHPENJAKDDLGAHFGEGNCKAA.bclumeck@home.com...
> I have a form that a user can put his contact info. This form posts to a
> file called results.php. The results.php file has a mail() command and
the
> echo (i.e. <? echo "$name"; ?>) to show the user confirmation of what he
> has submitted.
>
> However, if someone goes directly to results.php it will show Name: blank
> and email blank information. Is there a way for the page to post an error
> stating no information was submitted or is there a way to enable the page
to
> process without information?
>
> Thanks for the help,
> Ben
>