I have done these scripts a thousand times. I still however can't seem to sort out this issue.
The issue is that this block of code should return 3 images although it doesn't it only returns one image. The other one I am getting is from a different loop that I haven't tested yet but they are built the same way so I would presume it will do the same.
Here is my loop:
if( isset( $_COOKIE['Username'] ) && $ui['Acc_Type'] == "adm" ) {
$q = mysql_query("SELECT * FROM `galleries`") or die( "ERROR: " . mysql_error() );
while( $row = @mysql_fetch_array( $q ) ) {
$id = $row['id'];
$q = mysql_query("SELECT * FROM Images WHERE id='$id' LIMIT 1") or die( "ERROR: " . mysql_error() );
$data = mysql_fetch_array( $q );
if( $column == 0 ) {
echo '<tr>';
}
echo '<td><img src="http://localhost/pictures/gallery/'.$data['id'].'/'.$data['Src'].'" alt="'.$data['Name'].'" /></td>';
$column++;
if( $column == 4 ) {
echo '</tr>';
$column = 0;
}
$q = false;
$data = false;
$id = false;
}
}
I will attach a screenshot of the page. It is quite irritating the fact I have spent a good few hours the past two days and I have only managed to do the upload extraction and resizing, the gallery creation script, the image naming script and I have got stuck on this!
Thanks in advance.
P.S. Sorry had t zip the image it was too big for Daniweb to accept????