$imgf=""; $sqlc = pg_exec ($dbs,"select count(img) from imgfondo"); $rowc = pg_fetch_row($sqlc); $nf=$rowc[0]; $fn = mt_rand(1, $nf); $sqlf = pg_exec ($dbs,"select img from imgfondo where id=$fn"); $rowf = pg_fetch_row($sqlf); $imgf="$r/imgfondo/$rowf[0]"; ?>