Hey i am making online shopping portal as my term project. I want to add an image for everything that is available in my database for sale, so that when user click on that image all delete about it are shown in a form. Kindly help me regarding this ASAP.
Store the image names in the record containing your item details. Do not store the actual image in the database. If all images are in the same location, you do not need to include the path.
Database record example
product_id (int autoincrement primary key)
product_name (varchar 150)
product_price (decimal 6,2)
product_image (varchar 100)
Then, after loading your recordset, the following line would provide a link to the product details, using the image as the link:
<p><a href='productpage.php?product_id=<?php echo $product_id ?>'><img src='<?php echo "/images/$product_image ?>'></a> <?php echo "<b>$product_name</b><br/>[currency symbol goes here]$product_price<br/>$product_description " ?></p>
. . .this gives you the idea. Change to suit your own variable names, etc.