Why are you using stripslashes on form input? wouldnt you want addslashes? Cause stripslashes would be used for outputting data from a database that addslashes was used on. Or maybe I'm just making an *** of myself, idk, I'm a lil confused as to how you expect that to behave.
But as to what godaddy told you, I'm not to sure why that isn't working....I have a godaddy account and put your source in there. I didn't make a form posting the data, I just put my actual information in there.
PHP Code:
<?php
// get posted data into local variables $EmailFrom = "kbswix@gmail.com"; $EmailTo = "kbswix@gmail.com"; $Subject = "Nova Leap Proposal"; $Name = "My Name"; $CompanyName = "comapny"; $Phone = "867-5309"; $Tellusaboutyourproject = "This is my project man";
// validation $validationOK=true; if (Trim($EmailFrom)=="") $validationOK=false; if (!$validationOK) { print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">"; exit; }
// prepare email body text $Body = ""; $Body .= "Name: "; $Body .= $Name; $Body .= "\n"; $Body .= "CompanyName: "; $Body .= $CompanyName; $Body .= "\n"; $Body .= "Phone: "; $Body .= $Phone; $Body .= "\n"; $Body .= "Tellusaboutyourproject: "; $Body .= $Tellusaboutyourproject; $Body .= "\n";
// send email $success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
// redirect to success page if ($success){ print "<meta http-equiv=\"refresh\" content=\"0;URL=services.html\">"; } else{ print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">"; } ?>
Once I went to my page, I immediately got the email, and it did the redirect to services.html
So to be honest, I'm not to sure why it wouldn't be working, seems fine to me...unless it's that stripslashes command.
Last edited by kbfirebreather; 05-12-2009 at 01:14 PM..
Reason: put my spam email in there
|