I do forms like this
The if line just checks to see if any data has been passed if it has it
prints what you send else if shows the form
-Original Message-
From: Ben Clumeck [mailto:[EMAIL PROTECTED]]
Sent: 06 December 2001 17:14
To: [EMAIL PROTECTED]
Subject: [PHP] Forms and
It's good practice to check that needed variables were passed at the
top of the page.
if($name) {
normal display
exit
} else {
error display
exit
}
To take this further, you should verify that not only was the
required data sent, but that it was in the corre
what about checking for some mandatory field and if it doesn't exist,
display an error message. something like:
-Original Message-
From: Ben Clumeck [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 07, 2001 9:14 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Forms and Results with PH
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. ) to show the user confirmation of what he
has submitted.
However, if someone goes directly to results.php it will show Name: blank
and
4 matches
Mail list logo