Page 1 of 1

Component Form Help! unexpected T_VARIABLE???

Posted: Mon Apr 26, 2010 12:22 pm
by E_Rock
Okay so i went into my php file and went to do some debugging.
some stupid little mistake, i didn't close out my message form "".
but now im getting a differnt error:
<br />
<b>Parse error</b>: syntax error, unexpected T_VARIABLE in <b>/home/content/w/i/n/winsted/html/form_parse.php</b> on line <b>43</b><br />

Code: Select all

<?php
//Creat local variables from Flash ActionScript posted variables
$senderName =$_POST['userName'];
$senderCompany =$_POST['userCompany'];
$senderEMail =$_POST['userEMail'];
$senderComment =$_POST['userComment'];
$senderStandardStock =$_POST['userStandardStock'];
$senderStandardQuantity =$_POST['userStandardQuatity'];
$senderMonarchStock =$_POST['userMonarchStock'];
$senderMonarchQuantity =$_POST['userMonarchQuantity'];
$sender1stColor =$_POST['1stColor'];
$sender2ndColor =$_POST['user2ndColor'];
$senderFourColorProcess =$_POST['userFourColorProcess'];
$senderFoilStampandEmboss =$_POST['userFoilStampAndEmboss'];
$senderStockSupplied =$_POST['userStockSupplies'];
$senderEnvelopeManufacture =$_POST['userEnvelopeManufacture'];
$senderCustomWindowPeelnSeal =$_POST['userCustomWindowPeelnSeal'];

//Strip slashes on the Local typed-in variables for security and run any PHP based error check here
$senderName =stripslashes($senderName);
$senderCompany =stripslashes($senderCompany);
$senderEMail =stripslashes($senderEMail);

$to ="websales@winsted-thermo.com";
$from ="$senderEMail";
$subject ="Quote Request";
$message="Quote Request from $senderCompany
Name: $senderName
E-Mail: $senderEMail
Stock: $senderStandardStock     /     $senderMonarchStock
Quantity: $senderStandardQuantity     /    $senderMonarchQuantity
Color 1st: $sender1stColor
      2nd: $sender2ndColor
Four Color Process?: $senderFourColorProcess
Foil Stamp n Emboss?: $senderFoilStamandEmboss
Stock Supplies?: $senderStockSupplied
Envelope Manufacture?: $senderEnvelopeManufacture
Custom Window Peel n Seal?: $senderCustomWindowPeelnSeal

Additional Comments: $senderComment"

//Build $headers Variable
$headers = "From: $from\r\n";   // <----------this is line 43!
$headers .= "Content-type: text\r\n";
$to = "$to";
    // Send the EMail
    mail($to, $subject, $message, $headers);

    //Assemble the message that goes back to flash
    //The flash ActionScpri is looking for a return of "return_msg"
    $my_msg= "Thanks $senderName, your quote request has been sent.";
    //Print the data back to flash who is patiently waiting for it in the onCompleteHandler
    print "return_msg=$my_msg";
//Exit script
exit();
?>

Re: Component Form Help! unexpected T_VARIABLE???

Posted: Mon Apr 26, 2010 2:04 pm
by AbraCadaver
;

Re: Component Form Help! unexpected T_VARIABLE???

Posted: Mon Apr 26, 2010 2:06 pm
by Jonah Bron
Line 40 needs a semicolon at the end.

Exclamations in your subject title are unnecessary, and will at times steer otherwise helpful people away from your post.

Re: Component Form Help! unexpected T_VARIABLE???

Posted: Tue Apr 27, 2010 9:03 am
by katierosy
Although you have already been answered, you will find this error "syntax error,unexpected T_VARIABLE" very close to and above the line of the error.
To put a semicolon on line 40 : Additional Comments: $senderComment";