|
Posted by tea-mad brit on 10/17/02 11:37
I have an html form which goes to this script. It works, but I want to
prevent the form input being sent unless some of the input fields have data.
The reason is so that people don't submit blank forms by accident (which
triggers a counter, not shown here). I got this from a beginners book and
modified it.
How do I check for valid input? I tried putting <input type="hidden"
name="required" value="name,email,phone,organization"/> into my input html
form but it doesn't do anything. Thanks for your help. I don't know much.
<?php
$to .= "myemail";
$subject = "Web Response";
/* print "Name: $name <br />\n";
print "Email Address: $email <br />\n";
print "Phone: $phone <br />\n";
print "Title: $title <br />\n";
print "Organization: $organization <br /><br />\n";
print "Comments: $comments \n"; */
$message = "Contact Info: \n
Name: $name \n
Email: $email \n
Phone: $phone \n
Title: $title \n
Organization: $organization \n
Street: $street \n
City: $city \n
State: $state \n
Zip: $zip \n
Comments: $comments \n";
mail ($to, $subject, $message);
?>
--
Christopher
www.teamadness.com
slightly true stories of tea drinking
Navigation:
[Reply to this message]
|