Mark Raven
08-29-2004, 12:59 PM
EDIT: I seem to have fixed this. No idea what was wrong, but I no longer need help.
Basically, I have two fields that are entered through a form:
$email1 (the email which they used to pay me through paypal)
$email2 (the email which they want me to use when contacting them)
$email1 is required. $email2 is only required if the email they want me to contact them with is different from their paypal email address. Once they click "submit", I want to send a "thank you for ordering" message... to the email they want me to contact them at. This means I need to use what they entered in $email2 UNLESS they left it blank, in which case I'd need to use what they entered in $email1.
I thought something simple like this would work:
if ($email2 == "")
{
$mailto = $email1;
} else {
$mailto = $email2;
}
But apparently, it does not send anything unless the user fills in both $email1 and $email2 themselves.
Any idea what's wrong, or how I could fix it?
Basically, I have two fields that are entered through a form:
$email1 (the email which they used to pay me through paypal)
$email2 (the email which they want me to use when contacting them)
$email1 is required. $email2 is only required if the email they want me to contact them with is different from their paypal email address. Once they click "submit", I want to send a "thank you for ordering" message... to the email they want me to contact them at. This means I need to use what they entered in $email2 UNLESS they left it blank, in which case I'd need to use what they entered in $email1.
I thought something simple like this would work:
if ($email2 == "")
{
$mailto = $email1;
} else {
$mailto = $email2;
}
But apparently, it does not send anything unless the user fills in both $email1 and $email2 themselves.
Any idea what's wrong, or how I could fix it?
