[GUITAR.PHP]
<table id="table_latest" border=1><tr>
<?php
$con = mysql_connect("localhost" , "root" , "");
mysql_select_db("ppbmusix", $con);
$query = mysql_query("SELECT * FROM tbl_ac");
while($out = mysql_fetch_array($query))
{
echo "<form name = 'frmProducts' action = ''".$out['ac_pic']."'' method = 'GET'" ;
echo "<tr >" . "<td style = 'float: left;'>";
echo "<img src='".$out["ac_pic"]."' width='300px' height = '400px'";
echo "<br />" . "<br />" . "<br />";
echo "</td>";
echo "<tr>";
echo "<td align = 'center'>" . "<a href = 'cart.php'? id = '".$out['ac_num']."' name = 'id'> <img class = 'displayed' src = 'images/addtocart.jpg' /></a>" . "</td>" ;
echo "'".$out['ac_num']."'";
echo "</tr>";
echo "</tr>";
}
mysql_close($con);
?>
</tr></table>
CART.PHP
<?php $id = $_GET['id']; echo $id; ?>
I am only echoing first because I want to make sure first that it will show the right item id that was pressed and from there, i will store it to the database.

New Topic/Question
Reply



MultiQuote





|