$resultat->($query,$bdd) or die ();;
sur cette page
<!DOCTYPE html>
<head>
<title>tableau dynamique </title>
<link rel="stylesheet" type="text/css" href="scroller.css">
</head>
<body>
<center><h1>Abonnements</h1></center>
<div class= "border_table">
<center>
<?php
require_once "PDO_connect.php";
$query='SELECT * FROM smartphone.abonnements;';
$resultat->($query,$bdd) or die ();;
$total=($resultat);
if($total) {
echo'<div class="scroller" <table bgcolor="#FFFFFF">'."\n";
echo '<table border="1">'."\n";
echo "<tr>";
echo '<th>Operateur<th>';
echo '<th>SIM<th>';
echo '<th>PUK<th>';
echo '<th>Num ligne<th>';
echo '<th>Volume<th>';
echo '<th>Statut abo<th>';
echo "</tr>";
while($row = mysql_fetch_assoc($resultat)) {
echo '<td>'.$row["Operateur"].'<td>';
echo '<td>'.$row["Num SIM"].'<td>';
echo '<td>'.$row["PUK"].'<td>';
echo '<td>'.$row["Num ligne"].'<td>';
echo '<td>'.$row["Volume"].'<td>';
echo '<td>'.$row["Statut abo"].'<td>';
echo '</tr>'."\n";
}
echo '</table>'."\n";
}
else echo 'Pas d\'enregistrements dans cette table...';
?>
<form action="option.php" method="get">
Nom :<select name="nom">
<option value="name1">name1</option>
<option value="name2">name2</option>
<option value="name3">name3</option>
<option value="name4">name4</option>
</select><br>
</form>
</center>
<?
<?php
if(isset($_GET['nom']))
{
$name=$_GET['nom'];
$c=mysql_connect("localhost","root","Mm101010");
mysql_select_db("smartphone.employe");
$ins=mysql_query("INSERT INTO `option`
(name)
VALUES ('$name')",$c) or die(mysql_error());
if($ins)
{
echo "<br>".$name."inserted";
}
}
?>
<br><br>
<center>
<a class="Affectation" href="http://localhost/formulaire/Form_PHP/php_presque_fini/Affectation.php" rel="nofollow noopener noreferrer" target="_blank">Affectation</a>
<a class="Equipement" href="http://localhost/formulaire/Form_PHP/php_presque_fini/Equipement.php" rel="nofollow noopener noreferrer" target="_blank">Equipement</a>
<a class="Reaffectation_Equipement" href="http://localhost/formulaire/Form_PHP/php_presque_fini/Reaffectation_Equipement.php" rel="nofollow noopener noreferrer" target="_blank">Reaffectation Equipement</a>
<a class="Nouvelle_Affectation" href="http://localhost/formulaire/Form_PHP/php_presque_fini/Nouvelle_Affectation.php" rel="nofollow noopener noreferrer" target="_blank">Nouvelle Affectation</a>
<a class="Employe" href="http://localhost/formulaire/Form_PHP/php_presque_fini/Employe.php" rel="nofollow noopener noreferrer" target="_blank">Employe</a>
<a class="Modele" href="http://localhost/formulaire/Form_PHP/php_presque_fini/Modele.php" rel="nofollow noopener noreferrer" target="_blank">Modele</a><br>
</center>
<center><table>
<tr><td><div class="Operateur"> Operateur<input type="text" name="Operateur"> </div></td>
<td> </td>
<td><div class="Num_SIM"> Num SIM :<input type="text" name="Num_SIM"></div></td></tr>
<td> </td>
<tr><td><div class="PUK"> PUK : <input type="text" name="PUK"></div></td>
<td> </td>
<td><div class="Num_ligne"> Num ligne :<input type="text" name="Num_ligne"></div></td></tr>
<td> </td>
<tr><td><div class="Volume"> Volume :<input type="text" name="Volume"></div></td>
<td> </td>
<td><div class="Statut_Abo"> Statut Abo :<input type="text" name="Statut_Abo"></div></td></tr>
</table>
</center>
</body>
</html>
Merci