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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
| <?php
include("variables.inc.php");
include("identification.inc.php");
include("haut.inc.php");
$liendb = mysql_connect($bddserver, $bddlogin, $bddpassword);
mysql_select_db ($bdd);
if (isset($_POST['motclef']))
$motclef = $_POST['motclef'];
?>
<p align="left"> :: accueil</p>
<form action="admin.php" method="post">
<input type="text" name="motclef" value="<?php echo $_REQUEST['$motclef']; ?>"> ;
<input type="submit" value="rechercher">
</form>
<a href="admin.php">TOUS !</a> -
<table width="90%" align="center" border="1">
<tr>
<td class="intitule">Elève No Etab</td>
<td class="intitule">Nom</td>
<td class="intitule">Prénom</td>
<td class="intitule">Date Naissance</td>
<td class="intitule"></td>
</tr>
<?php
//echo $motcles = "".$_POST['motclef']."";
?>
<?php
if (isset($motclef))
{
echo $motclef;
$clause = " WHERE Nom LIKE '$motclef'";
//$clause = " WHERE Nom LIKE 'ROMET'";
//$clause= "ROMET";
//echo $clause;
//echo $motclef;
}
//if (isset($ordre))
//{
//$orderby = " ORDER BY Nom";
//}
$orderby = " ORDER BY Nom";
$sql = "SELECT * FROM $table_eleve" . $clause . $orderby;
$resultat = mysql_query ($sql);
echo $sql;
while ($eleve = mysql_fetch_array ($resultat))
{
$id = $eleve['Elève No Etab'];
$nom = $eleve['Nom'];
$prenom = $eleve['Prénom'];
$date = $eleve['Date Naissance'];
echo "<tr>";
echo "<td>$id</td>";
echo "<td>$nom</td>";
echo "<td>$prenom</td>";
echo "<td>$date</td>";
echo "<td>";
echo "<a href=eleve_edite.php?id=$id>voir</a>";
echo "</td>";
echo "</tr>";
}
echo "</table>";
?>
<?php
mysql_close($liendb);
include("bas.inc.php");
?> |
Partager