probleme en php

Répondre


Cette question est un moyen d’empêcher des soumissions automatisées de formulaires par des robots.
Smileys
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen: =D> #-o =P~ :^o :non: :priere: 8-|
Voir plus de smileys
  Revue du sujet
 

  Étendre la vue Revue du sujet : probleme en php

Re: probleme en php

par moogli » 11 mars 2011, 21:10

salut,

Comment récupérer les valeurs d'un formulaire : http://www.phpdebutant.org/article56.php
Extract c'est pas vraiment une bonne méthode de conception, de plus tu ne protège pas tes données => mysql_real_escape_string

@+

Re: probleme en php

par light86 » 11 mars 2011, 20:16

slt il faut affichez ta requête aprés tu test dans myadmin

c'est un sujet de licence ou master

probleme en php

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