Forum Moderators: coopster

Message Too Old, No Replies

Parse Error Php

Parse Errot Php

         

Imy_S3

11:32 am on Mar 16, 2004 (gmt 0)

10+ Year Member



Hi

Im trying to embed the following line in to my php script:

<a href="deleteShoppingSelection.php?shopid="<?php echo $row['shopid']?>">Delete</a>

Like this:

print" <td<a href="deleteShoppingSelection.php?shopid="<?php echo $row['shopid']?>">Delete</a>";

but keep getting the following error:

Parse error: parse error in /home/students/ug/ug75ixc/public_html/admin/adminShop/shoppingDatabaseDelete.php on line 76

HelenDev

11:33 am on Mar 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You seem to be missing a > off your <td

DoppyNL

11:35 am on Mar 16, 2004 (gmt 0)

10+ Year Member



you have to end a command with a ; in PHP
in both instance's they are missing!

so, add ";" 2 times!

py9jmas

11:38 am on Mar 16, 2004 (gmt 0)

10+ Year Member



print" <td<a href="deleteShoppingSelection.php?shopid="<?php echo $row['shopid']?>">Delete</a>";

You are trying to embed PHP within PHP when it gets to the <?php....

Try:
print "<td><a href="deleteShoppingSelection.php?shopid=".$row['shopid'].">Delete</a>";

HTH

Jon.

Imy_S3

12:09 pm on Mar 16, 2004 (gmt 0)

10+ Year Member



print "<td><a href="deleteShoppingSelection.php?shopid=".$row['shopid'].">Delete</a>";

Still getting errors with the above line embedded in to my php script

Birdman

12:12 pm on Mar 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you want to include double quotes in your print statement, you have to escape them. Also, you left out the closing double quote for the href attribute.

print "<td><a href=\"deleteShoppingSelection.php?shopid=".$row['shopid']."\">Delete</a>";