Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $db_host = "127.0.0.1";
- $db_name = "pfe2017";
- $db_user = "root";
- $db_pass = "";
- try {
- $bdd = new PDO("mysql:host=".$db_host.";dbname=".$db_name,$db_user,$db_pass);
- echo "succesfully connected";
- } catch (PDOException $e) {
- echo "Erreur de connexion";
- }
- <?php
- //echo "<form method='GET'>";
- $nom = $_POST['nom'];
- $prenom = $_POST['prenom'];
- $IDEtud = $_POST['IDEtud'];
- $addresse = $_POST['address'];
- $query = "INSERT INTO member ( nom, prenom, IDEtud, address) VALUES ('".$nom."', '".$prenom."', '".IDEtud."', '".address."')";
- $result = mysql_query($query);
- if (!$result ) {
- die("can't insert data: " .mysql_error());
- }
- else
- echo "Data are inserted successfully in Table membre <BR>";
- mysql_close($link);
- //echo "</form>";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement