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
| <?php
}else{
echo 'Enregistrement en cour...<br><br>';
$nom = htmlentities ($_POST['txtnom']);
$prenom = htmlentities ($_POST['txtprenom']);
$age = htmlentities ($_POST['txtage']);
$taille = htmlentities ($_POST['txttaille']);
$position = htmlentities ($_POST['Position']);
$equipe = htmlentities ($_POST['Equipe']);
if ((check_exist($nom)==false)&& (check_exist($prenom)==false)) {
mysql_connect ($db_server, $db_user, $db_pass);
mysql_select_db($db);
mysql_query("INSERT INTO Joueur(ID, nom, prenom, age, taille, position, equipe) VALUES ('', '$nom', '$prenom', '$age', '$taille', '$position', '$equipe')");
mysql_close();
echo 'Enregistrement Terminer<br><br>';
echo 'nom : ' . $nom . '<Br>prenom : ' . $prenom . '<br>age : ' . $age . '<br>taille : ' . $taille . '<br>position : ' . $position . '<br>equipe : ' . $equipe ;
} else {
echo 'Joueur existant. <a href=contenu_admin.php>Retour</a>';
}
}
} else {
?>
<form name= Ajout method = post action = contenu_admin.php> |
Partager