i have displayed all members in my site including there photos,which they uploaded.
this is the view.php
which image will appear for everymember who uploaded photo.
<?
echo"<img src=retrieve.php?id=$userid width=200 height=150>";
?>
retrieve.php
<?php
//PHP code (for images.php)
if(isset($_GET)){
$id = $_GET;
// Connecting to a MySql Database
include"config.php";
//selecting image
$query = "SELECT * FROM image WHERE userid = '$id'";
$result = mysql_query($query);
$count=mysql_num_rows($result);
if($count==1){
if($row = mysql_fetch_array($result)){
$id=$row;
$image = $row;
$filetype = $row;
header("Content-type: ". $filetype);
echo $image;
}
}
?>
Now i need to know what what can i do,so that for those member who dont have photo
a certain image will appear,indicating that there is no photo for that profile.
Any help will be appreciated.