Log in

View Full Version : Php Error



stevan
09-28-2007, 08:47 PM
I am trying to add a email link to a page and get thie error message

Parse error: syntax error, unexpected T_STRING in /home2/cruisew/public_html/crvsearch/cruise_book_send.php on line 129

line 129 <A HREF="mailto:steve@cruisewarehouse.cc">


Thxs Steve

djr33
09-28-2007, 09:30 PM
That's the generated HTML, not the PHP code, or, if it is PHP, that's not really a correct line (or it's part of several lines of output).

Include a bit more of the code around that if that is from the PHP source, or get the PHP source instead and post that.

Generally, errors are from:
1. Sometimes, the line itself (easy).
2. Frequently the line before or after, as something was left open or was closed too early, etc.
This seems the most common because the script will either reach the line in question and not know what to make of it because of something wrong in the line before (ie, missing semi-colon, etc.), or the line after will be confusing so it won't say it reached it yet when outputting the error... might get stuck before that.
3. Occasionally, esp. with open loops, etc., it will claim there is an error at the last line of your code because it was looping forever.*



unexpected T_STRING means that there was plain text in the script that doesn't fit.
Possible reasons:
1. Typo-- ex: eco 'hi';-- should be "echo"
2. No quotes, etc. ex: echo test;
3. Something isn't closed-- ex: echo '1' echo '2';
4. Improper placement-- ex: function() "string";

stevan
09-28-2007, 10:07 PM
<BR />
<H4>
Thank you again for choosing Cruisewarehouse.cc to arrange your cruise vacation. If you have any additional questions or need further information about your trip, please feel free to e-mail or call us and we will be happy to provide this for you.
<br><br>
Steve Brooks, Cruise Specialist <br>
Cruisewarehouse.cc <br>
Toll Free: (888) 974-7447
<br><br>


Email: <A HREF="mailto:steve@cruisewarehouse.cc">
http://www.cruisewarehouse.cc

</H4>
</body>

tech_support
09-29-2007, 09:22 AM
That's just HTML. Have you tried djr33's advice yet?
Don't just post us your code. Try it yourself. Tell us what happened.

And, we also need your PHP code.

djr33
09-29-2007, 10:14 AM
PHP code is not visible with View> Source. You must access the .php file directly from the server (FTP, likely), then cut/paste from that.
Again, the error has nothing to do with output line 129.