Jump to content

Jill78

Members
  • Posts

    17
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Jill78's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. That gave me: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /export/home/ji/jill/public_html/consumerorder7.php on line 3 Whatever 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.
  2. Hey andy- your order test came through to my email! So then maybe this is an issue with my server???
  3. 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 \n Email: $visitoremail \n Street: $visitorstreet\n City: $visitorcity \n State: $visitorstreet \n Zip Code: $visitorzipcode Payment Method: $paymentmethod \n Poster Style: $posterstyle \n Poster Line: $posterline \n Player Name: $playername \n Colors: $colors \n Main Text: $maintext \n Small Text: $smalltext \n Player Number: $playernumber \n Main Photo: $mainphoto \n Additional Info: IP = $ip \n Browser Info: $httpagent \n Referral: $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>
  4. I tried replacing with the single line, now it is line 41 mail("jillpearson@comcast.net", $subject, $msg, "Jill");
  5. 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?
  6. Here it is from the beginning. I changed the address to have street, city etc.  It's still giving me an error on line 10, which is the posterstyle line again! It is  "unexpected T_VARIABLE" <?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'];
  7. I removed lines and moved the $_POST['var'] section ahead and now I'm still getting and error, this time for line 6, which was the same line from before! $posterstyle = $_POST['posterstyle']; ?????? I just don't see anything wrong with this! On my form it reads: Poster Style:<br /> <select name="posterstyle" size="1"> <option value=" Bronze-12x18 ">Bronze-12x18 </option> <option value=" Silver-16x20 ">Silver-16x20 </option> <option value=" Gold-20x30 ">Gold-20x30 </option> </select>
  8. Here is the new script with Scott's suggestions: <?php 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 = $playername; $visitor = $_POST['visitor']; $visitoraddress = $_POST['visitoraddress']; $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']; <?php $msg="Name: $visitor \n Payment Method: $paymentmethod \n Poster Style: $posterstyle \n Poster Line: $posterline \n Player Name: $playername \n Colors: $colors \n Main Text: $maintext \n Small Text: $smalltext \n Player Number: $playernumber \n Main Photo: $mainphoto \n Additional Info: IP = $ip \n Browser Info: $httpagent \n Referral: $httpref \n "; ?> <?php mail({REMOVED BUT THIS PART WAS FINE}, $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>
  9. 18 is $paymentmethod = $_POST['paymentmethod']; 18, 19, and 20 are all drop down selections on my form. Do they need to be scripted differently since I'm not asking for whatever they wrote in, just what they SELECTED on the form?
  10. Well, I made all the changes you suggested and now I am still getting an error (unexpected T_VARIABLE) in line 19, which is simply $posterstyle = $_POST['posterstyle']; There are other $_POST in the code before it which do not cause errors, and it matches up with the "name" on my html form.
  11. Wow, thanks! I will try that out when I get a chance. Yes, I have been reading alot of tutorials on the web. Like I said, all I did was alter one that I found, which did not include $_POST.  thanks again
  12. BTW- Here is a weblink to the form this is susposed to go with. http://www.jillpearson.com/orderconsumers I copied it from a tutorial and altered it to fit my form. That is where something went wrong. When I used the tutorial samples on my website it worked just fine.
  13. Here is the entire code: <?php 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 = $playername; $visitor = $visitor; $visitoraddress = $visitoraddress; $paymentmethod = $paymentmethod;  $posterstyle = $posterstyle; $posterline = $posterline; $playername = $playername; $colors = $colors; $maintext = $maintext; $smalltext = $smalltext; $playernumber = $playernumber;      $mainphoto = $mainphoto; Name: $visitor \n Payment Method: $paymentmethod \n Poster Style: $posterstyle \n Poster Line: $posterline \n Player Name: $playername \n Colors: $colors \n Main Text: $maintext \n Small Text: $smalltext \n Player Number: $playernumber \n Main Photo: $mainphoto \n Additional Info: IP = $ip \n Browser Info: $httpagent \n Referral: $httpref \n "; $from = "From: $visitormail\r\n"; mail("jillpearson@comcast.net", $subject, $visitor, $paymentmethod, $posterstyle, $posterline, $playername, $colors, $maintext, $smalltext, $playernumber, $mainphoto, $from); ?> <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 610-873-0623. </div> <p align="center"> Date: <?php echo $todayis ?> <br />   <?php echo $ip ?> <br /> <br /> <a href="www.jillpearson.com"> Next Page </a> </p>
  14. There is more coding- that is just the area in question. 
  15. Likw I said, I am pretty clueless about PHP. I can create the form just fine, but getting it to work is another story. I will try your suggestion. I thought I needed to set it up like that so it makes sense in the email.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.