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
|
<?php
include ("ConnectBBook.php");
$Connexion = mysql_connect($serv, $id, $pass);
$connexionbase = mysql_select_db($bdd);
if(!empty($_POST['titr']) && !empty($_POST['auth']) && !empty($_POST['editeur']) && !empty($_POST['annee']) && !empty($_POST['isbn']) && !empty($_POST['synops']))
{
$sql="INSERT INTO $bdd (titre,autheur,editeur,annee,isbn,genre,synopsi) VALUES ('$titr','$auth','$editeur','$anne','$genre','$isbn','$synops')";
mysql_query($sql);
mysql_close($Connexion);
echo "<p>Livre $titr ajouté à la base</p>";
}
else{
echo "<p>Tout les champs doivent être remplis</p>";
}
?> |
Partager