king arthur Posted August 10, 2006 Share Posted August 10, 2006 Odd. Try replacing that whole lot with[code]extract($_POST);[/code](that will do the exact same thing as all those lines). Then see if you still get an error. Quote Link to comment Share on other sites More sharing options...
AndyB Posted August 10, 2006 Share Posted August 10, 2006 There is absolutely no syntax error resulting from those lines as posted. I copied them to my own server and they give no error at all. Are you sure you have uploaded the current/edited version to your server? Quote Link to comment Share on other sites More sharing options...
Jill78 Posted August 10, 2006 Author Share Posted August 10, 2006 Andy- yes! So it works for you? That is so odd. Could it be my browser? I don't get it....King Arthur- I don't get you you mean... replace the whole thing? Quote Link to comment Share on other sites More sharing options...
king arthur Posted August 10, 2006 Share Posted August 10, 2006 Replace all the lines you posted with just the one single line I posted. Quote Link to comment Share on other sites More sharing options...
Jill78 Posted August 10, 2006 Author Share Posted August 10, 2006 I tried replacing with the single line, now it is line 41mail("jillpearson@comcast.net", $subject, $msg, "Jill"); Quote Link to comment Share on other sites More sharing options...
king arthur Posted August 10, 2006 Share Posted August 10, 2006 There must still be something in your script that is throwing the PHP interpreter. Post the whole thing again. Quote Link to comment Share on other sites More sharing options...
ScottRiley Posted August 10, 2006 Share Posted August 10, 2006 when telling us your code, you need to post more than just the line with the orror, post about 5 lines below and 5 lines above the error too Quote Link to comment Share on other sites More sharing options...
Jill78 Posted August 10, 2006 Author Share Posted August 10, 2006 Here is the code that Andy tried out (I think) and it worked for him, but I got an error on the line reading: $posterstyle = $_POST['posterstyle'];When I replaced the upper part with extract($_POST), then I would get the error on this line:mail("jillpearson@comcast.net", $subject, $msg, "Jill");<?php$visitor = $_POST['visitor'];$visitoremail = $_POST['visitoremail'];$visitorstreet = $_POST['visitorstreet'];$visitorcity = $_POST['visitorcity'];$visitorstate = $_POST['visitorstate'];$visitorzipcode = $_POST['visitorzipcode'];$paymentmethod = $_POST['paymentmethod'];$posterstyle = $_POST['posterstyle'];$posterline = $_POST['posterline'];$playername = $_POST['playername'];$colors = $_POST['colors'];$maintext = $_POST['maintext'];$smalltext = $_POST['smalltext'];$playernumber = $_POST['playernumber']; $mainphoto = $_POST['mainphoto'];if(!$visitormail == "" && (!strstr($visitormail,"@") || !strstr($visitormail,"."))) {echo "<h2>Use Back - Enter valid e-mail</h2>\n"; $badinput = "<h2>Feedback was NOT submitted</h2>\n";}if(empty($visitor) || empty($visitormail) || empty($notes )) {echo "<h2>Use Back - fill in all fields</h2>\n";}echo $badinput;$todayis = date("l, F j, Y, g:i a") ;$subject = $visitor;$msg="Name: $visitor \nEmail: $visitoremail \nStreet: $visitorstreet\nCity: $visitorcity \nState: $visitorstreet \nZip Code: $visitorzipcodePayment Method: $paymentmethod \nPoster Style: $posterstyle \nPoster Line: $posterline \nPlayer Name: $playername \nColors: $colors \nMain Text: $maintext \nSmall Text: $smalltext \nPlayer Number: $playernumber \nMain Photo: $mainphoto \nAdditional Info: IP = $ip \nBrowser Info: $httpagent \nReferral: $httpref \n";mail("me@comcast.net", $subject, $msg, "Jill");?><div align="center">Thank you for you order. If you do not receive personalized order confirmation from us within two business days, please call us at 555-555-5555.</div><p align="center"> Date: <?php echo $todayis ?> <br /> <?php echo $ip ?> <br /> <br /> <a href="sportsposters"> Next Page </a> </p> Quote Link to comment Share on other sites More sharing options...
Jill78 Posted August 10, 2006 Author Share Posted August 10, 2006 Hey andy- your order test came through to my email!So then maybe this is an issue with my server??? Quote Link to comment Share on other sites More sharing options...
AndyB Posted August 10, 2006 Share Posted August 10, 2006 There's quite a few things that aren't quite right with the info that gets asked for and the info that gets sent, but that's all trivial stuff to fix later.Fact is - it works on my server (from a client URL, but what the heck) - http://www.brianashton.ca/orderform.html - as you now know.If you want to send me the complete order form and order form processing script (email to andy@halfadot.com), I'll get it working on my server and then - if needed - you can approach your web host and ask "how come this works on X and bombs on my server" Quote Link to comment Share on other sites More sharing options...
king arthur Posted August 10, 2006 Share Posted August 10, 2006 Try replacing the whole thing with this and see if you are still getting similar errors.[code]<?phpextract($_POST);if(!$visitormail == "" && (!strstr($visitormail,"@") || !strstr($visitormail,"."))) {echo "<h2>Use Back - Enter valid e-mail</h2>\n"; $badinput = "<h2>Feedback was NOT submitted</h2>\n";}if(empty($visitor) || empty($visitormail) || empty($notes )) {echo "<h2>Use Back - fill in all fields</h2>\n";}echo $badinput;$todayis = date("l, F j, Y, g:i a") ;$subject = $visitor;$msg="Name: $visitor \nEmail: $visitoremail \nStreet: $visitorstreet\nCity: $visitorcity \nState: $visitorstreet \nZip Code: $visitorzipcodePayment Method: $paymentmethod \nPoster Style: $posterstyle \nPoster Line: $posterline \nPlayer Name: $playername \nColors: $colors \nMain Text: $maintext \nSmall Text: $smalltext \nPlayer Number: $playernumber \nMain Photo: $mainphoto \nAdditional Info: IP = $ip \nBrowser Info: $httpagent \nReferral: $httpref \n";mail("me@comcast.net", $subject, $msg, "Jill");echo "<div align=\"center\">Thank you for you order. If you do not receive personalized order confirmation from us within two business days, please call us at 555-555-5555.</div><p align=\"center\"> Date: $todayis <a href=\"sportsposters\"> Next Page </a> </p> ";?>[/code] Quote Link to comment Share on other sites More sharing options...
Jill78 Posted August 10, 2006 Author Share Posted August 10, 2006 That gave me:Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /export/home/ji/jill/public_html/consumerorder7.php on line 3Whatever I had before was working on Andy's server. So I guess this is an issue with my server at this point. I'll contact them.Thanks all so much for your help. Quote Link to comment Share on other sites More sharing options...
king arthur Posted August 10, 2006 Share Posted August 10, 2006 It could be a lot of things. It could be your version of PHP or your error settings. You could put the line "phpInfo();" near the start of your script just temporarily and see what you can make of the info it prints out. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.