i want to show up random image from a database where these field are image1, image2, image3 chk attachment
now i want to show up these images randomly
Code: Select all
<? $query=mysql_query("select * from tbl_property where prop_id='5'");
$rsToGetPass=mysql_fetch_array($query);
if(($rsToGetPass['image1'] <> "") or ($rsToGetPass['image2'] <> "") or ($rsToGetPass['image3'] <> "")){
<img src ="images/property/mem_pics/<? echo [color=#BF0040]$rsToGetPass['image1'][/color] ;?>" width="189" height="145">
<? } elseif (($rsToGetPass['image1'] == "") && ($rsToGetPass['image2'] == "") && ($rsToGetPass['image3'] == "")){?>
<img src = "admin/images/no_pic.jpg" width="189" height="145" border="0">
<? }?>
i want to show up image randomly image1, image2, image3 (currebtly showing image1----color in red) there is also a problem if image1 is blank then it should be show either image2 or image 3,, if image 2 is blank then it show image1 and image3
thanks