It's good practice to check that needed variables were passed at the 
top of the page.

if($name) {

        normal display

} else {

        error display

To take this further, you should verify that not only was the 
required data sent, but that it was in the correct format and not 
some malicious attack.

>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,
>PHP General Mailing List (
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]

Jim Musil
Multimedia Programmer

PHP General Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to