Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Go Daddy PHP Form Problems
Old 05-11-2009, 10:53 PM Go Daddy PHP Form Problems
Skilled Talker

Posts: 64
Trades: 0
Hello everyone. I have several PHP forms on my website that have been working fine on Godaddy. They stopped working today and this is what Godaddy told me:

You need to use "relay-hosting.securesecureserver.net" with your form or it will not work. This is what my "process.php" file looks like.

Could someone please help me? Any ideas, this is really frustrating for me.

Thanks.


Quote:
<?php

// get posted data into local variables
$EmailFrom = Trim(stripslashes($_POST['EmailFrom']));
$EmailTo = "jenkins@gmail.com";
$Subject = "Nova Leap Proposal";
$Name = Trim(stripslashes($_POST['Name']));
$CompanyName = Trim(stripslashes($_POST['CompanyName']));
$Phone = Trim(stripslashes($_POST['Phone']));
$Tellusaboutyourproject = Trim(stripslashes($_POST['Tellusaboutyourproject']));

// 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\">";
}
?>
crj900 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-12-2009, 01:13 PM Re: Go Daddy PHP Form Problems
Extreme Talker

Posts: 177
Trades: 0
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
kbfirebreather is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Go Daddy PHP Form Problems
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.16168 seconds with 12 queries