misslois74
Programmer
im currently working on a page wherein i have to dynamically display an image in which the value is coming from the database, if the field contains null value meaning no image stored on it i set a default image which represent that there is no current image now my problem is if the field is null its not displaying the default image i have set but if there is an image stored its displaying that image:
here is my sample code:
im not sure where the problem lies...
hope somebody could help me with these...
thanks in advance..
here is my sample code:
Code:
<?php
include "connection_dbase_settings.php";
$membr_id = $_GET['mem_id'];
$pfile = $_POST['pic'];
$quer = "Select * from tbl_member_profile where member_id = $membr_id";
$result = mysql_query($quer);
while($row = mysql_fetch_array($result))
{
$picfile = $row['pic_file'];
?>
<div class="mid_in" id="mid_in">
<div class="mid_in_left">
<div class="mid_in_left_box2">
<?php if(isset($picfile))
{ ?>
<table>
<tr><td><img src="<?php echo $row['pic_file'] ?>" width="137" height="175"/></td></tr></table>
<!--<img src="images/avatar.gif" width="137" height="137" />-->
<?php }
else
{ ?>
<table>
<tr><td><img src="../images/nopic_192.gif" width="137" height="175"/></td></tr> </table>
<!--<img src="images/avatar.gif" width="137" height="201" /><img src="members/alvin.jpg" width="137" height="201" />-->
<?php } ?>
im not sure where the problem lies...
hope somebody could help me with these...
thanks in advance..