slt! j'ai ma base tout fonction bien. je reussi à recuperer des donnees de ma base mais je ne reussi pas à inserer donc voyer aussi mon code.
<body>
<?php
include("connexion.php");
if(isset($_POST['civilite_et']) AND isset($_POST['nom_et'])){
$civilite=$_POST['civilite_et'];
$nom=$_POST['nom_et'];
$prenom=$_POST['prenom_et'];
$date=$_POST['datenaiss_et'];
$lieu=$_POST['lieunaiss_et'];
$local=$_POST['localite_et'];
$contact=$_POST['contact_et'];
$comm=$_POST['commentaire_et'];
$result=("INSERT INTO `etudiant` VALUES(``, `civilite_et`, `nom_et`, `prenom_et`, `datenaiss_et`, `lieunaiss_et`, `localite_et`, `contact_et`, `commentaire_et`)");
mysqli_query($bdd,$result);
echo("insertion effectuée avec succès");
}
?>
<form id="form1" name="form1" method="post" action="">
<table width="200" border="0">
<tr>
<td><strong>civilite</strong></td>
<td><table width="200" border="0">
<tr>
<th scope="col"><input type="radio" name="civilite_et" id="radio" value="Mme"/>
Mme</th>
<th scope="col"><input type="radio" name="civilite_et" id="radio2" value="Mlle" />
Mlle</th>
<th scope="col"><input type="radio" name="civilite_et" id="radio3" value="M" />
M</th>
</tr>
</table></td>
</tr>
<tr>
<td><strong>nom</strong></td>
<td><input type="text" name="nom_et" id="nom_et" /></td>
</tr>
<tr>
<td><strong>prenom</strong></td>
<td><input type="text" name="prenom_et" id="prenom_et" /></td>
</tr>
<tr>
<td><strong>date naissance</strong></td>
<td><table width="200" border="0">
<tr>
<th scope="col"><input type="text" name="datenaiss_et" id="datenaiss_et" /></th>
<th scope="col">/</th>
<th scope="col"><input type="text" name="datenaiss_et" id="datenaiss_et" /></th>
<th scope="col">/</th>
<th scope="col"><input type="text" name="datenaiss_et" id="datenaiss_et" /></th>
</tr>
<tr>
<td>jour</td>
<td> </td>
<td>mois</td>
<td> </td>
<td>année</td>
</tr>
</table></td>
</tr>
<tr>
<td><strong>lieu de naissance</strong></td>
<td><input type="text" name="lieunaiss_et" id="lieunaiss_et" /></td>
</tr>
<tr>
<td><strong>localite</strong></td>
<td><input name="localite_et" type="text" id="localite_et" /></td>
</tr>
<tr>
<td><strong>contact</strong></td>
<td><input type="text" name="contact_et" id="contact_et" /></td>
</tr>
<tr>
<td><strong>commentaire</strong></td>
<td><input type="text" name="commentaire_et" id="commentaire_et" /></td>
</tr>
<tr>
<td><strong>
<input type="submit" name="button" id="button" value="Enregistrer" />
</strong></td>
<td><input type="reset" name="button2" id="button2" value="Annuler" /></td>
</tr>
</table>
</form>
</body>
</html>
<body>
<?php
include("connexion.php");
if(isset($_POST['civilite_et']) AND isset($_POST['nom_et'])){
$civilite=$_POST['civilite_et'];
$nom=$_POST['nom_et'];
$prenom=$_POST['prenom_et'];
$date=$_POST['datenaiss_et'];
$lieu=$_POST['lieunaiss_et'];
$local=$_POST['localite_et'];
$contact=$_POST['contact_et'];
$comm=$_POST['commentaire_et'];
$result=("INSERT INTO `etudiant` VALUES(``, `civilite_et`, `nom_et`, `prenom_et`, `datenaiss_et`, `lieunaiss_et`, `localite_et`, `contact_et`, `commentaire_et`)");
mysqli_query($bdd,$result);
echo("insertion effectuée avec succès");
}
?>
<form id="form1" name="form1" method="post" action="">
<table width="200" border="0">
<tr>
<td><strong>civilite</strong></td>
<td><table width="200" border="0">
<tr>
<th scope="col"><input type="radio" name="civilite_et" id="radio" value="Mme"/>
Mme</th>
<th scope="col"><input type="radio" name="civilite_et" id="radio2" value="Mlle" />
Mlle</th>
<th scope="col"><input type="radio" name="civilite_et" id="radio3" value="M" />
M</th>
</tr>
</table></td>
</tr>
<tr>
<td><strong>nom</strong></td>
<td><input type="text" name="nom_et" id="nom_et" /></td>
</tr>
<tr>
<td><strong>prenom</strong></td>
<td><input type="text" name="prenom_et" id="prenom_et" /></td>
</tr>
<tr>
<td><strong>date naissance</strong></td>
<td><table width="200" border="0">
<tr>
<th scope="col"><input type="text" name="datenaiss_et" id="datenaiss_et" /></th>
<th scope="col">/</th>
<th scope="col"><input type="text" name="datenaiss_et" id="datenaiss_et" /></th>
<th scope="col">/</th>
<th scope="col"><input type="text" name="datenaiss_et" id="datenaiss_et" /></th>
</tr>
<tr>
<td>jour</td>
<td> </td>
<td>mois</td>
<td> </td>
<td>année</td>
</tr>
</table></td>
</tr>
<tr>
<td><strong>lieu de naissance</strong></td>
<td><input type="text" name="lieunaiss_et" id="lieunaiss_et" /></td>
</tr>
<tr>
<td><strong>localite</strong></td>
<td><input name="localite_et" type="text" id="localite_et" /></td>
</tr>
<tr>
<td><strong>contact</strong></td>
<td><input type="text" name="contact_et" id="contact_et" /></td>
</tr>
<tr>
<td><strong>commentaire</strong></td>
<td><input type="text" name="commentaire_et" id="commentaire_et" /></td>
</tr>
<tr>
<td><strong>
<input type="submit" name="button" id="button" value="Enregistrer" />
</strong></td>
<td><input type="reset" name="button2" id="button2" value="Annuler" /></td>
</tr>
</table>
</form>
</body>
</html>