i have this weird problem in displaying images in my page using php and mysql,
what is stored in my db is just the filename of the image. when i was developing this in my
local pc this had worked perfectly but when i uploaded it on the web something wrong happended,images didn't appeared... can anybody help me please?.
here's the code of my query:
Code: Select all
//this is saved as a file called bus_showBus_query.php
<?php
include"../includes/connect.php";
$sql = "SELECT * FROM business WHERE bus_id = '$_GET[bid]'";
$result = mysqli_query($cxn,$sql) or die ("Unable to retrieve information!!.");
mysqli_close($cxn);
?>
//and here's the code to display the retrieved info from my db..
<?php
include"../includes/bus_showBus_query.php";
while($row = mysqli_fetch_assoc($result)){
extract($row);
/* here is the place where i have had the problem where the image does not appear*/
echo "<tr>
<img src='../images/business/{$row['img']}' class='no-border' height='400' width='430'>
</tr>";
/*this part here works just fine*/
echo "<tr> <td align='left' bgcolor='#99CCCC' width='100%'>
<p align='left'><b>Business Name :</b> {$row['bus_name']} </p>
<p align='left'><b>Business Type :</b> {$row['bus_type']} </p>
<p align='left'><b>Business Address :</b> {$row['bus_address']} </p>
<p align='left'><b>Business Manager/Proprietor :</b> {$row['bus_proprtor']} </p>
<p align='left'><b>Business Remarks :</b> {$row['remarks']} </p> ";
echo "</td></tr>";
}//end of while loop
?>