I TRIED TO CREATE A SIMPLE WEB ALBUM,SO THAT SOMEONE WILL BE ABLE TO UPLOAD HIS PHOTOS.UPLOADING WAS NOT A PROBLEM.
THE PROBLEM IS WHEN I`M DISPLAYING THEM,BCOZ FOR EXAMPLE IF ONE MEMBER HAS 9 PICTURES THEN ONLY ONE PICTURE, I`M MEAN THE FIRST PICTURE TO BE UPLOADED WITH MEMBER IS BEEN DISPLAYED 9 TIMES.
SO I DONT KNOW WHERE I`M WRONG,I WANT ALL 9 PICTURES TO BE DISPLAYED.
AND NOT ONE 9 TIMES.
BELOW IS THE CODE I USED
FOR DISPLAYING.
<?php
$user=$_SESSION['user'];
$userid=$_GET['userid'];
include"config.php";
$index="SELECT id,image FROM myphoto WHERE userid ='$userid' and user='$user'";
$member=mysql_query($index);
$counter=0;
while($row=mysql_fetch_array($member)){
$id=$row['id'];
//$name=$row['name'];
$user=$row['user'];
//$family=$row['family'];
//$country=$row['country'];
if($counter==3) {
echo "<br />";
// reset the counter$counter = 0;
$counter = 0;
}
?>
<?php
echo"<a href= mypictures.php?id=$userid ><img src=picretrieve.php?userid=$userid width=120 height=120 border=0 alt='$id''>";
?>
<?php
$counter++;
}
?>