I have a script that works on a Windows NT server. However, when I move the same script with no changes to a Linux server, the form doesn't work.
I know very little about Linux, can you look at this script and tell me what's going on?
<?
$adminaddress = "you@you.com";
$siteaddress ="http://www.websitehere.com";
$sitename = "Site Name";
$date = date("m/d/Y H:i:s");
if ($REMOTE_ADDR == "") $ip = "no ip";
else $ip = getHostByAddr($REMOTE_ADDR);
if ($action != ""):
mail("$adminaddress","Contact Form Information",
"A visitor at $sitename has left the following contact information\n
Name: $fname
Last Name: $lname
E-mail: $email
Company Name: $legalname
Program Execution: $billname
Office Number: $taxid
Wireless Phone Number: $bname
Wireless Phone Carrier: $bphone
Contact Preference: $bcity
Project Details: $comments
Logged Info :
Using: $HTTP_USER_AGENT
Hostname: $ip
IP address: $REMOTE_ADDR
Date/Time: $date", "FROM:$adminaddress");
mail("$email","Thank You for visiting $sitename",
"Hi $fname,\n
Thank you for your interest in $sitename! We will be in contact with you shortly.\n
Cheers,
$sitename
$siteaddress","FROM:$adminaddress");
$sendresult = "Thank you for applying. You will receive a confirmation email shortly.";
$send_answer = "answer=";
$send_answer .= rawurlencode($sendresult);
echo "$send_answer";
endif;
?>