This is a discussion on Re: [PHP] How New Is <<<HERE? within the PHP General forums, part of the PHP Programming Forums category; By "comment[ing] out line 11", I take it you mean making a comment of line 11. I ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
By "comment[ing] out line 11", I take it you mean making a comment of line
11. I just did--as this problem woke me from a night's sleep at just past 2:30 AM--and the error message is now: Parse error: parse error, unexpected $ in [path to file] on line 19 Where will this end? Steve Original Message: ----------------- From: Olwen Williams webmaster@handyman.co.nz Date: Sat, 27 Dec 2003 18:25:00 +1300 To: stiano@optonline.net Subject: Re: [php] How New Is <<<HERE? Comment out line 11 to checkj it's the cause of the proble. If the error goes away then retype the line. I just tested this code and got no errors. It could be a character that is not what it seems. stiano@optonline.net wrote: > Cesar, > > Sorry to have taken so long to answer. My day got complicated. Anyway, > here's the code all over again, with the last changes I was advised to > make. I took out the line spaces and added line numbers. But first, the > latest error message: > > Parse error: parse error, unexpected T_VARIABLE in [path to file] on > line 11 > > The code: > > 1 <html> > 2 <head> > 3 <title> > 4 persistence demo > 5 </title> > 6 </head> > 7 <body> > 8 <h1>Persistence Demo</h1> > 9 <form> > 10 <?php > 11 $txtBoxCounter = $_POST['txtBoxCounter']; -- Olwen Williams See my B&B site http://www.bandbclub.com and my new site http://www.handyman.co.nz - A virtual shed for real kiwi blokes. -------------------------------------------------------------------- mail2web - Check your email from the web at http://mail2web.com/ . |
|
|||
|
Interesting that it's the same variable on both lines. The second error
would not show untill the first disappeared. Would you have copied and pasted some of the line? I'm still for retyping the lines in case there's something odd lurking in there and not visible. stiano@optonline.net wrote: > By "comment[ing] out line 11", I take it you mean making a comment of line > 11. I just did--as this problem woke me from a night's sleep at just past > 2:30 AM--and the error message is now: > > Parse error: parse error, unexpected $ in [path to file] on line 19 > > Where will this end? > > Steve > > Original Message: > ----------------- > From: Olwen Williams webmaster@handyman.co.nz > Date: Sat, 27 Dec 2003 18:25:00 +1300 > To: stiano@optonline.net > Subject: Re: [php] How New Is <<<HERE? > > > Comment out line 11 to checkj it's the cause of the proble. If the > error goes away then retype the line. I just tested this code and got > no errors. It could be a character that is not what it seems. > > stiano@optonline.net wrote: > > >>Cesar, >> >>Sorry to have taken so long to answer. My day got complicated. Anyway, >>here's the code all over again, with the last changes I was advised to >>make. I took out the line spaces and added line numbers. But first, the >>latest error message: >> >> Parse error: parse error, unexpected T_VARIABLE in [path to file] on >>line 11 >> >>The code: >> >>1 <html> >>2 <head> >>3 <title> >>4 persistence demo >>5 </title> >>6 </head> >>7 <body> >>8 <h1>Persistence Demo</h1> >>9 <form> >>10 <?php >>11 $txtBoxCounter = $_POST['txtBoxCounter']; > > -- Olwen Williams See my B&B site http://www.bandbclub.com and my new site http://www.handyman.co.nz - A virtual shed for real kiwi blokes. |
|
|||
|
> -----Original Message-----
> From: stiano@optonline.net [mailto:stiano@optonline.net] > Sent: Saturday, 27 December 2003 20:56 > To: webmaster@handyman.co.nz > Cc: php-general@lists.php.net > Subject: Re: [php] How New Is <<<HERE? > > > By "comment[ing] out line 11", I take it you mean making a comment of line > 11. I just did--as this problem woke me from a night's sleep at just past > 2:30 AM--and the error message is now: > > Parse error: parse error, unexpected $ in [path to file] on line 19 > > Where will this end? > > Steve > > Original Message: > ----------------- > From: Olwen Williams webmaster@handyman.co.nz > Date: Sat, 27 Dec 2003 18:25:00 +1300 > To: stiano@optonline.net > Subject: Re: [php] How New Is <<<HERE? > > > Comment out line 11 to checkj it's the cause of the proble. If the > error goes away then retype the line. I just tested this code and got > no errors. It could be a character that is not what it seems. > > stiano@optonline.net wrote: > > > Cesar, > > > > Sorry to have taken so long to answer. My day got complicated. Anyway, > > here's the code all over again, with the last changes I was advised to > > make. I took out the line spaces and added line numbers. But first, the > > latest error message: > > > > Parse error: parse error, unexpected T_VARIABLE in [path to file] on > > line 11 > > > > The code: > > > > 1 <html> > > 2 <head> > > 3 <title> > > 4 persistence demo > > 5 </title> > > 6 </head> > > 7 <body> > > 8 <h1>Persistence Demo</h1> > > 9 <form> > > 10 <?php > > 11 $txtBoxCounter = $_POST['txtBoxCounter']; > > -- For what it is worth, I cut and pasted your full html into a file. Under PHP version 4.3.1 It runs from the command line without fault. Apache 1.3.22 It runs without fault (increments properly). What text editor are you using? I saved the code as both Unix and DOS format and it works for both. I've attached my file for you to try. Hope it helps as I can't fault the code. Regards Grant Walters Brainbench 'Most Valuable Professional' for Unix Admin Walters & Associates, P O Box 13-043 Johnsonville, Wellington, NEW ZEALAND Telephone: +64 4 4765175 OR 4762661, CellPhone 025488265, ICQ# 23511989 "Never argue with an idiot. They drag you down to their level, then beat you with experience." |
|
|||
|
Steve --
From your private reply to me, we know that ripping out the <<<HERE stuff makes no difference, so it has nothing to do with that. I would also be inclined to rip out all of the bare HTML to make sure you don't have anything funky in there, too, especially since it comes before the error. ...and then stiano@optonline.net said... % % By "comment[ing] out line 11", I take it you mean making a comment of line % 11. I just did--as this problem woke me from a night's sleep at just past % 2:30 AM--and the error message is now: OK; there is obviously some problem with line 11. Since it reads fine for us and runs when we try it, it must be in your actual code. The next things I would try are - if the original file is short, zip it up and attach it, or else make it available for download, so that we can see the *real* thing - insert before and after line 11 an innocuous print "testing\n"; statement, and then break the line around the = so it becomes three lines and see where the parse error ends up [Oh, and uncomment the line, of course.] % % Parse error: parse error, unexpected $ in [path to file] on line 19 We'll get to that later. Now that we know that there is a problem with line 11, let's fix it first. % % Where will this end? At the error(s), of course :-) % % Steve HTH & HAND & Happy Holidays :-D -- David T-G * There is too much animal courage in (play) davidtg@justpickone.org * society and not sufficient moral courage. (work) davidtgwork@justpickone.org -- Mary Baker Eddy, "Science and Health" http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iD8DBQE/7XsNGb7uCXufRwARAqNdAKC14ixMVrDzuNoptEcQFA7bb3r9hw Cgopn5 45N51NX9SAq2WksAgypN2zE= =FDkR -----END PGP SIGNATURE----- |