T_ENCAPSED_AND_WHITESPACE error?
Posted: Thu Nov 30, 2006 9:38 pm
Im trying to output a value to another page but I get this error when I try and run the below script. When I take the $ros off the page will run but won't carry over variables to the next page. Any suggestions?
error: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/penguinp/public_html/extramediumapparel/membermu/viewcart.php on line 28
error: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/penguinp/public_html/extramediumapparel/membermu/viewcart.php on line 28
Code: Select all
<?
require("popupheader.inc");
$dbh=mysql_connect ("localhost", "penguinp_member", "guess");
mysql_select_db ("penguinp_XMmembers");
$result= mysql_query("SELECT * FROM CartItems")
or die(mysql_error());
echo"<table border='0' cellspacing='10' cellpadding='10'>";
echo"<tr><th>Product Name</th><th>Small</th><th>Medium</th><th>Large</th><th>XLarge</th>";
while($row = mysql_fetch_array($result)) {
echo "<tr><td><div align='center'>";
echo $row['product_name'];
echo "</div></td><td><div align='center'>";
echo $row['Small'];
echo "</div></td><td><div align='center'>";
echo $row['Medium'];
echo "</div></td><td><div align='center'>";
echo $row['Large'];
echo "</div></td><td><div align='center'>";
echo $row['XLarge'];
echo "</div></td><td><div align='center'>";
echo "<input type='hidden' name='product_name' value='$row['product_name']'>";
echo "</div></td><td><div align='center'>";
echo "<form id='edit' action='edit.php' method='post'><input type='submit' name='edit' value='edit'>";
echo "</div></td><td><div align='center'>";
echo "<form id='delete' action='delete.php' method='post'><input type='submit' name='product_name' value='remove'>";
echo "</div></td></tr>";
}
echo"</table>";
?>