par
amoula_amel » 11 mars 2011, 19:47
bsr,je suis entrain de faire mon pfe c'est une application intranet d'un centre d'appel en php,jé un petit problème concernant l'enregistrement des données de ma formulaire dans ma base:
fich.html
<html>
<body>
<form name="formulaire" method="post" action="conn_db_form.php">
<fieldset>
<legend class="Style5"><strong><em>Information Personnel</em></strong></legend>
<table width="776" height="238" border="0" align="center">
<tr>
<td width="142"><strong>Matricule:</strong></td>
<td width="194">
<input type="text" name="matricule" size="8" /> </td>
<td width="130"><strong>CIN:</strong></td>
<td width="292">
<input type="text" name="cin" size="8" /> </td>
</tr>
<tr>
<td><strong>Nom:</strong></td>
<td>
<input type="text" name="nom" size="20" /> </td>
<td><strong>Prénom:</strong></td>
<td>
<input type="text" name="prenom" size="20" /> </td>
</tr>
<tr>
<td><strong>Adresse:</strong></td>
<td>
<input type="text" name="adresse" /> </td>
<td><strong>E_Mail:</strong></td>
<td>
<input type="text" name="email" /> </td>
</tr>
<tr>
<td><strong>Délivraison:</strong></td>
<td>
<input type="text" name="delivraison" size="10" />
</td>
<td><strong>Date de naissance:</strong></td>
<td>
<input name="dn_jours" type="text" onkeypress="Compter(this,forms[0].dn_mois)" size="2">/
<input type="text" name="dn_mois" size="2" onkeypress="Compter(this,forms[0].dn_annee)">
/
<input name="dn_annee" type="text" size="4" maxlength="4">
</td>
</tr>
<tr>
<td><strong>Mobile:</strong></td>
<td>
<input type="text" name="mobile" size="15" />
</td>
<td><strong>Tel:</strong></td>
<td>
<input type="text" name="tel" size="15" />
</td>
</tr>
<tr>
<td><strong>Login CBC:</strong></td>
<td>
<input type="password" name="login_CBC" />
</td>
<td><strong>Login Win:</strong></td>
<td>
<input type="password" name="login_Win" />
</td>
</tr>
<table border="0" align="center">
<tr>
<td><strong>MDP Win:</strong></td>
<td>
<input type="password" name="MDP_Win" />
</td>
</tr>
</table>
</table>
<fieldset>
<table width="248" height="36" border="0" align="center">
<tr>
<td width="21">
<input type="radio" name="pers" />
</td>
<td width="133"><strong>Personnel </strong></td>
<td width="20">
<input type="radio" name="TA" />
</td>
<td width="56"><strong>TA</strong></td>
</tr>
</table>
</fieldset>
</fieldset>
<center><p>
<input type="submit" value="Enregistrer" />
<input type="reset" value="Annuler" />
</p></center>
</form>
</body>
</html>
fich.php
<?php
$connect = mysql_connect("localhost","root","");
mysql_select_db("smartel", $connect);
if (isset($_POST['enregistrer']))
{
extract ($_POST,EXTR_OVERWRITE);
$req=mysql_query("insert INTO personnel VALUES('','$matricule','$cin','$nom','$prenom','adresse','email','$delivraison','$dn_jrs','$dn_mois','$dn_annee','$mobile','$tel','$login_CBC','$login_win','$mdp_win')" );
mysql_query($req);
mysql_close();
}
?>
alors le prob est que les donnée que jé entrée dans ma formulaire n'est pas enregistrer dans ma base,svp si quelqu'un peut m'aider, et merci d'avance
bsr,je suis entrain de faire mon pfe c'est une application intranet d'un centre d'appel en php,jé un petit problème concernant l'enregistrement des données de ma formulaire dans ma base:
[b][color=#0000FF]fich.html[/color][/b]
[html]<html>
<body>
<form name="formulaire" method="post" action="conn_db_form.php">
<fieldset>
<legend class="Style5"><strong><em>Information Personnel</em></strong></legend>
<table width="776" height="238" border="0" align="center">
<tr>
<td width="142"><strong>Matricule:</strong></td>
<td width="194">
<input type="text" name="matricule" size="8" /> </td>
<td width="130"><strong>CIN:</strong></td>
<td width="292">
<input type="text" name="cin" size="8" /> </td>
</tr>
<tr>
<td><strong>Nom:</strong></td>
<td>
<input type="text" name="nom" size="20" /> </td>
<td><strong>Prénom:</strong></td>
<td>
<input type="text" name="prenom" size="20" /> </td>
</tr>
<tr>
<td><strong>Adresse:</strong></td>
<td>
<input type="text" name="adresse" /> </td>
<td><strong>E_Mail:</strong></td>
<td>
<input type="text" name="email" /> </td>
</tr>
<tr>
<td><strong>Délivraison:</strong></td>
<td>
<input type="text" name="delivraison" size="10" />
</td>
<td><strong>Date de naissance:</strong></td>
<td>
<input name="dn_jours" type="text" onkeypress="Compter(this,forms[0].dn_mois)" size="2">/
<input type="text" name="dn_mois" size="2" onkeypress="Compter(this,forms[0].dn_annee)">
/
<input name="dn_annee" type="text" size="4" maxlength="4">
</td>
</tr>
<tr>
<td><strong>Mobile:</strong></td>
<td>
<input type="text" name="mobile" size="15" />
</td>
<td><strong>Tel:</strong></td>
<td>
<input type="text" name="tel" size="15" />
</td>
</tr>
<tr>
<td><strong>Login CBC:</strong></td>
<td>
<input type="password" name="login_CBC" />
</td>
<td><strong>Login Win:</strong></td>
<td>
<input type="password" name="login_Win" />
</td>
</tr>
<table border="0" align="center">
<tr>
<td><strong>MDP Win:</strong></td>
<td>
<input type="password" name="MDP_Win" />
</td>
</tr>
</table>
</table>
<fieldset>
<table width="248" height="36" border="0" align="center">
<tr>
<td width="21">
<input type="radio" name="pers" />
</td>
<td width="133"><strong>Personnel </strong></td>
<td width="20">
<input type="radio" name="TA" />
</td>
<td width="56"><strong>TA</strong></td>
</tr>
</table>
</fieldset>
</fieldset>
<center><p>
<input type="submit" value="Enregistrer" />
<input type="reset" value="Annuler" />
</p></center>
</form>
</body>
</html>[/html]
[b][u] [color=#0000FF]fich.php[/color][/u][/b]
[php]<?php
$connect = mysql_connect("localhost","root","");
mysql_select_db("smartel", $connect);
if (isset($_POST['enregistrer']))
{
extract ($_POST,EXTR_OVERWRITE);
$req=mysql_query("insert INTO personnel VALUES('','$matricule','$cin','$nom','$prenom','adresse','email','$delivraison','$dn_jrs','$dn_mois','$dn_annee','$mobile','$tel','$login_CBC','$login_win','$mdp_win')" );
mysql_query($req);
mysql_close();
}
?>[/php]
alors le prob est que les donnée que jé entrée dans ma formulaire n'est pas enregistrer dans ma base,svp si quelqu'un peut m'aider, et merci d'avance