Forum Moderators: coopster
Thanks for the help!
[edited by: jatar_k at 10:39 pm (utc) on July 14, 2005]
[edit reason] removed code, just too much [/edit]
normally when you get a parse error on the last line things to for are msimatched or missing braces. Try that and try to isolate the exact point of the error.
<added>I saw a few mentions in some searching about missing quotes causing that error
remember though that the forum software nukes all the indents, it may have been indented and those <php> tags around it an attempt to keep the formatting. ;) but bestbbs is tricky for posting code.
ok I reformatted the code for myself
I get this error
Parse error: parse error, unexpected $ on line 221
I think you have a mismatched brace
where should this if end
if (isset($_POST['submit'])) {
I am thinking that it should be around this line
include_once ('header.php');
but if my indenting is correct then it isn't closed
the one I identified in the above post is one
I am not sure which exactly is the other one because when 2 are missing and there is no indentation there is no way to know if I am guessing right
but this might be it
if($lname && $position && $phone1) { //if everything required is filled out
I kept deleting matched chunks until only 66 lines remained and I had 2 broken ifs left, added 2 braces and it got through the parser
tabs don't work, they need to be spaces, you can use pre tags around it but that could cause a few problems. The thing is, we don't really do long code posts, they just don't get answered. In this particular case I happened to be really bored so I had over half an hour to donate, doesn't happen very often.
You notice that my first answer was correct
normally when you get a parse error on the last line things to look for are mismatched or missing braces.
so the code wasn't really necessary anyway ;)
also take a look at this thread
How much code should I post? [webmasterworld.com]