Forum Moderators: coopster

Message Too Old, No Replies

Tokenizer problem

Another newbie with Tokenizer problem.

         

PepperChef

6:45 am on Nov 23, 2003 (gmt 0)

10+ Year Member



Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in #REMOVED# on line 51.

Ok I'm fairly new at PHP(Less then a week)and I'm not exactly sure whats casuing the error here. I used the herdoc method in other peices of my scripts and had no problems, but then again they weren't inside a loop. I put in the numbers on the left so that you could tell which line had the error.

43 -do {
44 -$qur1 = "SELECT * FROM Installed WHERE (ID = $rcur);" ;
45 -$Info1 = mysql_query($qur1);
46 -$rcur++;
47 -
48 -$line = mysql_fetch_array($Info1, MYSQL_ASSOC);
49 -
50 -$paginfo = <<< DOI;
51 -<Form Method=POST Target=$line["admin"]>
52 -<Input type=hidden name=login value=$Plog>
53 -<Input type=hidden name=password value=$Ppass>
54 -<Input type=hidden name=login value=$Plog>
55 -<Input type=submit value=$line["function"]>
56 -</Form><BR><BR>
57 -DOI;
58 - Echo $paginfo;
59 - If ($line[ID] == "")
60 - $paginfo = "";
61 - $est=1;
62 -
63 - mysql_free_result($Info1);
64 -
65 -
66 -}
67 -While ($est <> 1);

shasan

7:12 am on Nov 23, 2003 (gmt 0)

10+ Year Member



Welcome to Webmaster World!

I'm not that great with PHP either, but my guess would be that it's because of the HTML you're using for the form. You should put an echo around that..

51 echo "<Form Method=POST Target=".$line["admin"].">
52 -<Input type=hidden name=login value=$Plog>
53 -<Input type=hidden name=password value=$Ppass>
54 -<Input type=hidden name=login value=$Plog>
55 -<Input type=submit value=".$line["function"].">
56 -</Form><BR><BR>";

I think that's the problem, php doesn't automatically recognize and write HTML.

hope that works.

PepperChef

7:16 am on Nov 23, 2003 (gmt 0)

10+ Year Member



Thats a herdoc variable(PHP 4) once it is made I use the echo command to feed it out. Also note that line 60 isn't where its supposed to be =P thats a mistake in the copy/paste.

EDIT: typos

[edited by: PepperChef at 7:19 am (utc) on Nov. 23, 2003]

PepperChef

7:17 am on Nov 23, 2003 (gmt 0)

10+ Year Member



Dang it.. all the typos I'm going to bad I shouldn't be posting at 2 am...