ok i cant get this thing to add 1 to # views it gets from DB
this is my code:
PHP Code:
$fgall= $DB_site->query("SELECT gallery_index.gallery_views,gallery.gallery_id,gallery.image_id,gallery.image_url,gallery.image_des,gallery.image_views,gallery.image_rating,gallery.image_date FROM gallery,gallery_index WHERE gallery_index.gallery_views='$id'");
$gallery= $DB_site->fetch_array($fgall);
$views=++$gallery[gallery_index];
$tviews=$views;
$DB_site->query("UPDATE gallery_index SET gallery_views='$tviews' WHERE gallery_id='$id'");
eval('$navbar .= "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('gallery_gal') . '");');
}
?>
for some reason it just changes em all to 1 and thats it