$imageFolder = "images/"; $result=mysql_query("select image_id,image_type,image_text, image_id*0+rand() as r from t_images where image_id<>0 order by r limit 1"); if (!$result) { echo("
Error fetching image details: " . mysql_error() . "
"); exit; } $row = mysql_fetch_array($result); $image_id = $row["image_id"]; $image_text = $row["image_text"]; $image_type = $row["image_type"]; $image_path= $imageFolder . "img" . $image_id . $image_type; $size = GetImageSize ($image_path); $image_width = $size[0]; $image_height = $size[1]; if($image_width > 350) { $image_width=350; } /* if($image_height > 350) { $image_height=350; } height=" echo($image_height); ?>" */ ?>| echo($image_text); ?> |