1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| <?php
session_start();
$_SESSION['pseudo'];
try
{
$pdo_options[PDO::ATTR_ERRMODE] = PDO::ERRMODE_EXCEPTION;
$bdd = new PDO('mysql:host=mysql51-57.perso;dbname=', '', '', $pdo_options);
$reponse = $bdd->query('SELECT * FROM textesaleatoire ORDER BY rand() LIMIT 1,1');
while ($donnees = $reponse->fetch())
{
<?
<table width="100%" border="1" class="arrondiombre">
<tr>
<td><?php echo $donnees['textes']; ?></td>
</tr>
</table>
<?php
}
$reponse->closeCursor();
}
catch(Exception $e)
{
die('Erreur : '.$e->getMessage());
}
?> |
Partager