Source : lesson_13_a3_create_password_table.php |
Résultat |
<?php require ("../commons/connect_to_db.php"); //mysql_select_db($db) ; //read the table echo "<table border=1><tr><th>User</th><th>Pass</th> <th>Exp timestamp</th><th>Exp date</th></tr>"; $result = mysqli_query($mysqli,"SELECT * FROM atelierphp_sol_pass_words "); $fields = mysqli_num_fields($result); while ($row=mysqli_fetch_array($result)) { echo "<tr>"; for($i=0;$i<$fields;$i++) { echo "<td>$row[$i]</td>"; $expiration_date = $row[$i]; } echo "<td>".date("d/m/Y",$row[$fields-1])."</td></tr>"; } echo "</table>"; echo "<br/><a href=lesson_13_b_login_form.php> Saisie user/mot de passe pour entrer sur le site</a><br/>"; ?>
|
|