Hi Everybody,
I am working a project that display product image. So to get more details about the products i put link, so when we hover the image we get a link like:
localhost/kbashop/display.html.php?name=alcatel.jpg
So how can i modify the above link to something like: localhost/kbashop/alcatel.html ?
I have seen on many ecommerce site.
<?php include_once'includes/connect.php'; try { $sql = "SELECT filename FROM productlist LIMIT 4"; $s = $pdo->query($sql); $result = $s->fetchAll(PDO::FETCH_ASSOC); $counter = 0; } catch (PDOException $e) { $error = "Problem with your code".$e->getMessage(); } ?> KBASHOP figcaption { text-align:center; font-weight: bold; font-size: 12px; border: 2px solid olive; padding-top: 5px; } </head>
KBAShop.com
</header>
<ul class="products">
<?php foreach($result as $row):
$name = $row['filename'];
list($width, $height) = getimagesize("images/thumbs/$name");
?>
<li>
<a href="display.html.php?name=<?php echo $name;?>">
<img src="images/thumbs/<?php echo $row['filename']?>" width="<?php echo $width;?>" height="<?php echo $height;?>"/>
</a>
</li>
<?php endforeach;?>
</div>
<div class="footer-info cf">
<p>© Copyright - Tous droits réservés aux test - 2015</p>
</div>
</footer>
Please any link to tutorial or tips or advise on this topics will really like saving.
So here i am putting my code for more help.
Thanks