1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
   | <?php
$host="localhost";
$root="root";
$pass="";
mysql_connect($host, $root, $pass); 
mysql_select_db("jeuxinternet");
$result = mysql_query('SELECT * FROM question');
 
	while($row=mysql_fetch_assoc($result)) 
	{
	echo '<p>'.htmlentities($row['laquestion']).'</p>';
	echo '<p>'.htmlentities($row['repun']).' <input type="radio" name="vrep1" /></p>';
	echo '<p>'.htmlentities($row['repdeux']).' <input type="radio" name="vrep1" /></p>';
	echo '<p>'.htmlentities($row['reptroix']).' <input type="radio" name="vrep1" /></p>';
	echo '<p>'.htmlentities($row['lien']).'</p><br />';
	}	
 
mysql_query('SELECT nomjeux FROM jeux ORDER by rand() limit 1');
mysql_query('SELECT laquestion,repun,repdeux,reptroix,lien FROM question ORDER by rand() limit 1');
mysql_close();
?><input type="submit" value="valider" /> | 
Partager