I am a newbie trying to get a script that worked on another server a couple of weeks ago, to work on a new server.
I have the feeling the code is ok, but something else is wrong.
The hosting co has reg_globals on.
Please take a look and let me know if there is something wrong with the scripts (recommend.php and action.php) or if there is something else that could be the problem.
The thank you screen comes up after submitting, but the email never arrives.
Thanks
:sad:
recommend.php
- Code: Select all
<form action="action.php" method="post">
Your name:<br> <input type="text" name="name" size="15"><br>
Your E-mail:<br> <input type="text" name="email" size="15"><br>
Your Friends E-mail:<br><input type="text" name="femail"><br>
Optional Message:<br>
<textarea rows="4" name="recon" cols="25">
</textarea><br>
<input type="submit" name="submit" value="Recommend!">
</form>
action.php
- Code: Select all
<?
if (!$name) {echo "You must enter your name, Thank you"; } else {
if (!$email) {echo "Please enter your e-mail"; } else {
if (!$femail) {echo "Please enter your friend's email"; }
else{
$headers = "From: $email\r\nReply-To: $femail\r\n";
PRINT "Thank you for recommending us!";
mail("$femail", "Great Site for Flu Shot Information in Western New York", "
For an excellent resource on Flu Clinic schedules in Western New York,
visit: <http://www.immunizewny.org> \r\n\r\n
$recon
",$headers);
}
}
}



