Here is my form code :
<form action="inscription_smmar2.php" method="post" class="form-horizontal" role="form">
<div class="form-group">
<label for="nom" class="col-sm-2 control-label">Nom&Prénom</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="nom" name="nom" placeholder="Nom&Prénom">
</div>
</div>
<div class="form-group">
<label for="labo" class="col-sm-2 control-label">Laboratoire</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="labo" name="labo" placeholder="Nom du Laboratoire">
</div>
</div>
<div class="form-group">
<label for="email" class="col-sm-2 control-label">Mail</label>
<div class="col-sm-10">
<input type="mail" class="form-control" id="email" name="email" placeholder="mail">
</div>
</div>
<div class="form-group">
<label for="pass" class="col-sm-2 control-label">Mot de Passe</label>
<div class="col-sm-10">
<input type="password" class="form-control" id="pass" name="pass">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button name="submit_m" type="submit" class="btn btn-primary"> <b>Valider</b> </button>
</div>
</div>
</form>
And then the php handling data insert into my database's table :
<?php session_start();
$nom = $_POST['nom'];
$labo = $_POST['labo'];
$mail = $_POST['email'];
$mdp = $_POST['pass'];
echo $mdp."; ".$nom;
try{
$bd = new PDO('mysql:host=localhost;port=3306;dbname=cl54-smad','cl54-smad','s/Cdq-!N-');
}catch(Exception $ex){
echo $ex;
}
$req = $bd -> exec("insert into laboratoire(nom, responsable, mail, mdp) VALUES('".$labo."', '".$nom."', '".$mail."', '".$mdp."')");
?>
I really tried for hours and also searched in different threads but couldn't fing anything until now.
Edit : I finally found the core of the problem, I think I messed something with the "laboratoire" table properties in the SGBD, thus the queries maybe can't be performed and executed anymomre for it in which case I created a new table and the problem is actually solved.