Jul 17, 2005
I'm filling out forms on one page, then trying to send an
View 11 Replies
email and print out the vars on the next page.
Q1: Whenever I insert the mail script, it gives me a parse error.
Please point out my syntax errors, etc.
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or
`T_NUM_STRING' in /mypathhere/proposalconfirm.php on line 2
--script in question
$msg = "x x proposal for:
$msg .= " $_POST['cpcomp']
$msg .= " Address: $_POST['cpaddress']
$msg .= " $_POST['cpcity'], $_POST['cpstate'] $_POST['cpzip']
$mailheaders = "From: company name here
$mailheaders = "CC: $_POST['cpemail']";
mail("email@example.com","x x Custom Proposal",$msg,$mailheaders);
--rest of script--
The printing of all vars works fine (once I removed the double
quotes from the post var callouts)
Q2: Do I need sessions to track the form vars from page to page
or am I adding unnecessary complexity to this?
My last large PHP dev work was about 2 years ago. Since then,
quick and dirty flatfile database connections (member lists)
are all I've had to contend with. Things have really changed