This is a discussion on "[SOLVED] parse error, unexpected T_EXIT in php mail script" within the PHP Forum section. This forum, and the thread "[SOLVED] parse error, unexpected T_EXIT in php mail script are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
[SOLVED] parse error, unexpected T_EXIT in php mail script
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
[SOLVED] parse error, unexpected T_EXIT in php mail script
I have created a hmlt/php consultation form (which works fine) that sends to this php script to send the results to me via email.
No matter what I try, I keep getting this error message: Parse error: parse error, unexpected T_EXIT, expecting ',' or ';' in /homepages/36/d222381006/htdocs/consultemail.php on line 65 Can anyone see anything obvious that I am missing? (Sorry for all the variables) Thank you so much in advance for your help!
Last edited by Rakuli; Dec 12th, 2007 at 07:29. Reason: [code] became [php] |
|
|
|
||||
|
Re: parse error, unexpected T_EXIT in php mail script
Your problem starts here
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
|
|||
|
Re: parse error, unexpected T_EXIT in php mail script
There is a serious security problem with your script.
The $brideemail variable is not checked for validity before being passed on in the email header. Anyone can easily inject fake headers and use your script for sending spam. Check out one of the following sites, for how to validate emails http://www.ilovejackdaniels.com/php/...ss-validation/ http://www.devshed.com/c/a/PHP/Email...tion-with-PHP/ |
|
|||
|
Re: parse error, unexpected T_EXIT in php mail script
Thank you both!
I took the validation code out because I was having trouble getting the script to work and I thought I'd better get the basic one working then add it back in. I made the change suggested in the e-mail line and got the following message: Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /homepages/36/d222381006/htdocs/consultemail.php on line 80 (Line 80 is the e-mail line we are changing) I tried moving the second slash outside the quote mark and got the same result. Do you know why this error might be happening? Thanks again for all your help! |
|
||||
|
Re: parse error, unexpected T_EXIT in php mail script
Post your code, I want to see what it looks like now you've changed it.
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
|||
|
Re: parse error, unexpected T_EXIT in php mail script
Here it is again...
|
|
||||
|
Re: parse error, unexpected T_EXIT in php mail script
You haven't done what Rakuli said to do, follow his post.
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
|||
|
Re: parse error, unexpected T_EXIT in php mail script
So sorry -- I thought we were just talking about the one line.
I fixed it now (THANK YOU, THANK YOU!) In case it helps anyone else, here's the script that works. But it brings up another question... I'll save that for a new post.
Just out of curiosity, does it matter if I validate the e-mail in my php page where the form is (I validate several required fields there) or does it need to be on this page with the script? Thank you again so much for your help with this script! |
|
||||
|
Re: [SOLVED] parse error, unexpected T_EXIT in php mail script
If you mean should you validate with javascript or PHP - definitely PHP.
Javascript an easily be turned off or altered.
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [SOLVED] Parse error-Need Help! | dhossai | PHP Forum | 6 | Dec 17th, 2007 23:21 |
| PHP Mail Submit Form Error | longstand | PHP Forum | 6 | Nov 11th, 2007 16:02 |
| What is a Parse Error? | rubyfruit | Starting Out | 1 | Jul 5th, 2007 20:40 |
| Parse Error | Maverick25r | PHP Forum | 4 | Sep 15th, 2006 16:55 |
| syntax error: unexpected T_BOOLEAN_AND... | jswebdev | PHP Forum | 4 | Jan 28th, 2006 07:29 |