Forum Moderators: coopster

Message Too Old, No Replies

PHP Error cannot parse

PHP Error cannot parse

         

Imy_S3

12:08 am on Mar 10, 2004 (gmt 0)

10+ Year Member



Hi

Got some code below

I want it so when the submit button is pressed the value that appears in the text box on the next page is the 'id number'

but keep getting error
Parse error: parse error in public_html/cinemaBookingStageOne.php
I know its something to do with this line

NAME=variableName value ="<? echo $row['filmid']?>" SIZE=5>";

Could it be the syntax?

for($j=0; $j<$nrows; $j++)
{
echo ( '<form action="cinemaBookingStageTwo.php" method="post">' );

$row = pg_fetch_array ($result);

printf ("<tr><td>%s</td>
<td>%s</td>
</tr>", $myrow['filmid']);

print "<tr><td>" . $row["filmid"];
print "<td><INPUT TYPE=TEXT NAME=variableName value ="<? echo $row['filmid']?>" SIZE=5>";
print "\n";
}

carneddau

12:30 am on Mar 10, 2004 (gmt 0)

10+ Year Member



Hi,

You don't need php tags inside your print statement.

print "<td><INPUT TYPE=TEXT NAME=variableName value ="<? echo $row['filmid']?>" SIZE=5>";

should be:

print "<td><INPUT TYPE=TEXT NAME=variableName value =" . $row['filmid'] . " SIZE=5>";

Imy_S3

1:59 am on Mar 10, 2004 (gmt 0)

10+ Year Member



cheers mate, that worked beautifully :)