PDA

View Full Version : form help again


carolinawebdesign
07-25-2007, 04:27 PM
Well, I set my form up at www.familyfirstcommunity.com/contactus.html (http://www.familyfirstcommunity.com/contactus.html) and did a test email about 5 minutes ago and have not received it yet. How long does it usually take to get the email? Am I being impatient or is something wrong with my php... Here it is, I hope this is allowed...

Also here is a screen shot of the page in dw:
http://www.familyfirstcommunity.com/screenshotdw.gif

<?php
//--------------------------Set these paramaters--------------------------
// Subject of email sent to you.
$subject = 'Referral from FamilyFirstCommunity.com! Please read.';
// Your email address. This is where the form information will be sent.
$emailadd = 'mail@advisionssc@yahoo.com';
// Where to redirect after form is processed.
$url = 'http://www.familyfirstcommunity.com/contactus.html';
// Makes all fields required. If set to '1' no field can not be empty. If set to '0' any or all fields can be empty.
$req = '0';
// --------------------------Do not edit below this line--------------------------
$text = "Results from form:\n\n";
$space = ' ';
$line = '
';
foreach ($_POST as $key => $value)
{
if ($req == '1')
{
if ($value == '')
{echo "$key is empty";die;}
}
$j = strlen($key);
if ($j >= 20)
{echo "Name of form element $key cannot be longer than 20 characters";die;}
$j = 20 - $j;
for ($i = 1; $i <= $j; $i++)
{$space .= ' ';}
$value = str_replace('\n', "$line", $value);
$conc = "{$key}:$space{$value}$line";
$text .= $conc;
$space = ' ';
}
mail($emailadd, $subject, $text, 'From: '.$emailadd.'');
echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">';
?>

Jittor
07-25-2007, 04:39 PM
You have:

// Your email address. This is where the form information will be sent.
$emailadd = 'mail@advisionssc@yahoo.com';

I don't think that is correct. It should be mail_advisionssc@yahoo.com or advisionssc@yahoo.com. I think there are to many @'s Also, for me it usually takes less than 5 minutes to receive the email.

carolinawebdesign
07-25-2007, 04:42 PM
Thanks for pointing that out... I will change it to

$emailadd = 'ccc@yahoo.com';
and see if that works...

carolinawebdesign
07-25-2007, 04:47 PM
Ok that worked. I was mistaking the mailto with mail@... Duh...

Jittor
07-25-2007, 04:59 PM
it's always the little things :) Sorry for posting your email I will change it to something no-discrete if you would like. It was just easier at the time, but now that it's fixed you might not want your email hanging out there

carolinawebdesign
07-25-2007, 05:09 PM
it's always the little things :) Sorry for posting your email I will change it to something no-discrete if you would like. It was just easier at the time, but now that it's fixed you might not want your email hanging out there

Sure, I didn't really worry about having it on there, but I edited mine, so I guess you could to when you get a sec.

Mark_W
07-25-2007, 05:12 PM
Am I save in saying that although you have sorted out why the email hasn't been sent, that not all the fields are being sent with the email?

Mark_W
07-25-2007, 05:16 PM
Actually, looking at your first post, I can safely say that no, the fields aren't being sent with the email.

Give me a couple of minutes and ill help you out.

carolinawebdesign
07-25-2007, 05:37 PM
Mark All is good now. Thanks for offering to help. I am sure I will need more help. :)