Jump to content

PHP Form not working with godaddy.


crj900

Recommended Posts

I have a several PHP forms on my website that is hosted with Godaddy. They were working for 3 weeks and they randomly stopped. They told me it was because I needed to add 'secure-relayhostingserver' to my script so they blocked them. Does anyone know how to fix this? It is really upsetting me and I need the help fast. Please help. Thanks.

 

 

<?php

 

// get posted data into local variables

$EmailFrom = Trim(stripslashes($_POST['EmailFrom']));

$EmailTo = "[email protected]";

$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\">";

}

?>

Link to comment
https://forums.phpfreaks.com/topic/157764-php-form-not-working-with-godaddy/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.