Thanks, maybe i can come your house. And maybe sit and watch a little tv.
but after your dumb remarks the code still dosent work, but my little brain kicked in and this is what i came up with. Nice and simple the way i like it.
mysql_connect($host,$user,$pass);
mysql_select_db($database) or die("Could not select database");
$q = "SELECT * FROM ".$prefix."search WHERE type IN ('jpg','jpe','jpeg','png','gif') ORDER BY RAND() LIMIT 1";
$result = MySQL_query($q);
$r = MySQL_fetch_array($result);
$r1 = $r['url'];
echo "<center><img src=\"$r1\" width=\"90\" height=\"90\"></center>";