Ver originalmysql_connect("localhost", "root", "") or die("No se pudo conectar: " . mysql_error()); mysql_select_db("nombre_bd"); session_start(); $rango = mysql_query("SELECT rank_id FROM phpbb_dkranks") or die(mysql_error()); while($fila = mysql_result($rango, 0)) {if ($fila==2) { $security_code = rand(0, 10000); echo "Hola mundo";}}