Perplexing problem.
| From: | Gary | Date: | Fri, 05 Jun 2009 15:28:51 +0000 |
| Subject: | Perplexing problem. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-293669@lists.php.net to get a copy of this message | ||
I have a form script that is not cooperating. When I fill out this form, I
get the checkbox "yes", but not the checkbox "info" Also, in the message on
the result page that displays, I get "Yes, send me referral Caaaaaards! at
the bottom. ( I have spelled card as Ccccccard and Caaaaaard to see where
they are coming from).
So if(isset) for the info is not working, but the if(isset) for the yes is.
I have switched positions but no change.
The link to try this is http://www.paulgdesigns.com/elk/referform.inc.php
Can anyone see what I am missing here?
Thanks.
Gary
<?php
$fname=STRIPSLASHES($_POST['fname']);
$lname=STRIPSLASHES($_POST['lname']);
$title=STRIPSLASHES($_POST['title']);
$company=STRIPSLASHES($_POST['company']);
$street=STRIPSLASHES($_POST['street']);
$town=STRIPSLASHES($_POST['town']);
$zip=STRIPSLASHES($_POST['zip']);
$phone=STRIPSLASHES($_POST['phone']);
$fax=STRIPSLASHES($_POST['fax']);
$county=STRIPSLASHES($_POST['county']);
$phone=STRIPSLASHES($_POST['phone']);
$email=STRIPSLASHES($_POST['email']);
$comments=STRIPSLASHES($_POST['comments']);
$date=STRIPSLASHES($_POST['date']);
$time=STRIPSLASHES($_POST['time']);
$location=STRIPSLASHES($_POST['location']);
echo "Thank you $fname for your submission!<br /><br />";
echo "You have submitted the following information.<br /><br />";
echo "Name: $fname $lname<br />";
echo "Title: $title<br />";
echo "Company: $company<br />";
echo "Address: $street $town $zip<br />";
echo "Zip: $zip<br />";
echo "Phone Number: $phone<br />";
echo "Fax Number: $fax<br />";
echo "E-Mail Address: $email<br />";
if (isset($_POST['info']))
{
echo "Yes, send me information on your referral program!<br /><br />";
}
if (isset($_POST['yes']))
{
echo "Yes, send me referral Cccccards!<br /><br />";
}
echo "$fname, we have also sent you an e-mail to $email with the submitted
information as well as our contact information for your convienience. Thank
you for the opportunity to serve you!";
// checks if bot
if ($_POST['address'] != '' ){
die("Changed field");
}
/*This is the email message to submitter*/
$contact="sanitized";
$from_d="$email";
$to_d="$email";
$subject_d='Thank you from ;
$msg_d="Thank you $fname for your submission, find our contact information
listed for your convenience.\n\n"
."$contact\n\n"
. "You have submitted the following information\n\n"
. "Name: $fname $lname \n"
. "Street Address: $street\n"
. "Town: $town\n"
. "Zip Code: $zip\n"
. "Phone Number: $phone\n"
. "E-Mail Address: $email\n"
. "Yes, Send me referral Cards\n"
. "Yes, Send me infomation on your referral program\n"
;
mail($to_d, $subject_d, $msg_d, 'From:' . $from_d);
/*this is to elk, y*/
$from="$email";
$to="xxx.xxxx.com";
$subject="Submission from Referral Form";
$msg= "This is a submission from elkenv.com. Please send referral
cards.\n\n"
. "Clients Name: $fname . $lname \n"
. "Title: $title\n"
. "Company Name: $company\n"
. "Street Address: $street\n"
. "Town:$town\n"
. "Zip: $zip\n"
. "Telephone: $phone\n"
. "Email Address: $email\n"
;
if (isset($_POST['info']))
{
echo "Yes, send me information on your referral program!<br />";
}
if (isset($_POST['yes']))
{
echo "Yes, send me referral Caaaaaards!<br />";
}
mail($to, $subject, $msg, 'From:' .$from);
?>