Greetings!
I have a website www.lanceronlinejobs.com/our_franchises.php I have a franchise images. I want to display each franchise record from database whenever a user click on franchise link. Here is my code.
ourfranchises.php code:
<?php
include('fconnection.php');
$sql = mysql_query("SELECT * FROM tbl_franchise ORDER BY id DESC") or die(mysql_error());
$row3 = mysql_fetch_array($sql);
?>
<a href="franchiseDetails.php?city=<?php echo $row3['city'];?>"><img src="images/lbatkhela.jpg" width="150" height="150" alt="Batkhela" /></a>
----------------------------------------------------------------------
franchiseDetails.php code:
<?php
$id = $_GET['id'];
$query = "SELECT * FROM tbl_franchise WHERE id = '$id' ORDER BY id DESC LIMIT 1";
$result = mysql_query($query);
if (!$result) {
echo "NO RECORD FOUND";
} else {
while($row3 = mysql_fetch_array($result)):
?>
Manager Name: <?php echo $row3['manager_name'];?>
Please help me. Any help would be appreciated.
Thanks.