Still a beginner on doing PHP and SQL. Anyway, it's a site where it consists of clickable image products. Every product has its own name, price and description that comes from the database but I'm not really sure about how can I do this by clicking the product will bring its product name, price and description to another page? Here's an illustrative example of what I mean:
Here's what I did trying to make it appear to another page:
<div class="product-100" id=<?PHP echo("'".$ItemID."'"); ?>>
<?PHP echo "<a href='content pages/a-2.php?ItemID=$ItemID' >"; ?>
<span class="overlay">
<p><?PHP echo($ItemName); ?><br>
<?PHP echo($ItemPrice);?><br>
<?PHP echo($ItemDesc);?></p>
</span>
</a>
And here's what the other page I did with:
$ItemID = $_GET['ItemID'];
$viewproducts = "SELECT * FROM tbl_Items WHERE ItemID = '".ItemID."'";
Of course, ItemID of the product is the only one that shows to the other page.
Aucun commentaire:
Enregistrer un commentaire