NickG21 Posted July 21, 2009 Share Posted July 21, 2009 Hey everyone, im getting this error on a page where im trying to redisplay cart info from a temporary table that's setup. Here's the error and the code: Parse error: syntax error, unexpected '>' in .../order.php on line 25 Line 25: echo '<tr><td width="250px"><a href="products.php?id=' . $row['PrID'] . '"> ' . $row['PrDispName'] . '</a></td><td rowspan="2"><img src="' . $row['PrImage'] . '" alt=' . $row['PrName'] . '" height="50px" width="50px"></td></tr>'; code: /*Update tblCustomer with CC Information*/ $sqlCCUpdate = "UPDATE tblCustomer set CuCCType = '" . $CCardType . "', CuCCNum = '" . $CCNum . "', CuCCSVC = '" . $CCCSV . "', CCExpDate= '" . $CCMonth . $CCYear . "',CCName='" . $CCName . '" WHERE CuSessID ="' . $_COOKIE['PHPSESSID'] . '"; echo $sqlCCUpdate; $rssqlCCUpdate = mysql_query($sqlCCUpdate); /*Get Products from Cart*/ $SQLCuCart = "SELECT CartPrID, CartPrQty from tblCart WHERE CartSessionID = ' . $CuID . '"; $rsSQLCuCart = mysql_query($SQLCuCart); ?> <div id="content"> <table> <?php while($PrIDs = mysql_fetch_array($rsSQLCuCart)){ $sql = "SELECT * from tblProduct where PrID=' . $PrIDs['CartPrID'] . '"; $result = mysql_query($sql); while($row = mysql_fetch_array($result)){ echo '<tr><td width="250px"><a href="products.php?id=' . $row['PrID'] . '"> ' . $row['PrDispName'] . '</a></td><td rowspan="2"><img src="' . $row['PrImage'] . '" alt=' . $row['PrName'] . '" height="50px" width="50px"></td></tr>'; echo '<tr><td>$' . $row['PrPrice'] . '</td></tr>'; echo '<tr><td>Qty:' . $PrIDs['CartPrQty'] . '<hr/></td>'; echo '</tr>'; $total = $row['PrPrice'] * $PrIDs['CartPrQty']; } $_SESSION['total'] += $total; } ?> </table> </div> thanks for anything in advance!! Quote Link to comment https://forums.phpfreaks.com/topic/166844-cant-figure-out-simple-parse-error/ Share on other sites More sharing options...
ignace Posted July 21, 2009 Share Posted July 21, 2009 $sql = "SELECT * from tblProduct where PrID=' . $PrIDs['CartPrID'] . '"; should be: $sql = 'SELECT * from tblProduct where PrID=' . $PrIDs['CartPrID']; Quote Link to comment https://forums.phpfreaks.com/topic/166844-cant-figure-out-simple-parse-error/#findComment-879784 Share on other sites More sharing options...
NickG21 Posted July 21, 2009 Author Share Posted July 21, 2009 sorry but that didnt work, still receiving the same error Quote Link to comment https://forums.phpfreaks.com/topic/166844-cant-figure-out-simple-parse-error/#findComment-879843 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.