Click to See Complete Forum and Search --> : email form problems...


caynada
07-22-2003, 12:05 PM
Can anyone spot where I'm going wrong with the following form script. $Address is a textarea as is $Comments. $HearAbout is a drop down list.

<?

$mailto = 'mc2@candw.ky' ;
$subject = "Information Request" ;
$formurl = "http://www.stuartslaw.com/form.html" ;
$thankyouurl = "http://www.stuartslaw.com/thankyou.html" ;
$FirstName = $_POST['FirstName'] ;
$LastName = $_POST['LastName'] ;
$Title = $_POST['Title'] ;
$Company = $_POST['Company'] ;
$Department = $_POST['Department'] ;
$Address = $_POST['Address'] ;
$POBox = $_POST['POBox'] ;
$City = $_POST['City'] ;
$State = $_POST['State'] ;
$Country = $_POST['Country'] ;
$Zip = $_POST['Zip'] ;
$Business = $_POST['Business'] ;
$Phone = $_POST['Phone'] ;
$Mobile = $_POST['Mobile'] ;
$Fax = $_POST['Fax'] ;
$Email = $_POST['Email'] ;
$CurrentClient = $_POST['CurrentClient'] ;
$CaymanBusiness = $_POST['CaymanBusiness'] ;
$InvestmentFunds = $_POST['InvestementFunds'] ;
$CapitalMarkets = $_POST['CapitalMarkets'] ;
$ProjectFinance = $_POST['ProjectFinance'] ;
$RealEstate = $_POST['RealEstate'] ;
$Compliance = $_POST['Compliance'] ;
$PrivateClient = $_POST['PrivateClient'] ;
$Insurance = $_POST['Insurance'] ;
$Regulatory = $_POST['Regulatory'] ;
$Shipping = $_POST['Shipping'] ;
$Other = $_POST['Other'] ;
$Referal = $_POST['Referal'] ;
$HearAbout = $_POST['HearAbout'] ;
$comments = $_POST['comments'] ;


mail("$mailto", "$subject," "From:$mailto");
header( "location: $thankyouurl" );
?>

pyro
07-22-2003, 12:11 PM
What is or isn't working?

Da Warriah
07-22-2003, 12:22 PM
well the only thing i can see off the top of my head would be if your server is running less than PHP 4.1.0, $_POST wont work, youll have to use $HTTP_POST_VARS instead, or bug your server until they upgrade...

otherwise youll have to tell us exactly what isnt working...

caynada
07-22-2003, 01:56 PM
i'll try that out, THANKS

caynada
07-22-2003, 02:18 PM
here is the error message I recieve:

Parse error: parse error, unexpected '"' in C:\Cayman-Webs\Stuarts.com\feedback.php on line 46

any ideas?

pyro
07-22-2003, 02:20 PM
What is line 46?

caynada
07-22-2003, 02:24 PM
mail("$mailto", "$subject," "From:$mailto");

pyro
07-22-2003, 02:31 PM
You have your comma inside your quote rather than outside it for the $subject...

mail("$mailto", "$subject", "From:$mailto");