8722 sujets

Développement web côté serveur, CMS

Bonsoir,

Arrivée à la page mon_compte.php, où tout fonctionnait correctement, je me suis rendue compte que pdo n'est pas supporté par Free qui m'héberge, donc j'ai remplacé mes requêtes pdo par mysql, et rajouté donc des mysql_real_escape_string là où j'ai cru bon de le faire.

Mais voila, depuis quelques heures je tourne en boucle à chercher où et pourquoi lorsque je m'inscris sur "inscription.php", mon script me dit : "Inscription enregistrée. Vous pouvez vous connecter", mais n'enregistre rien en base. Pas d'erreur ou de warning qui s'affiche non plus.

Ma page connexion.php fonctionne, puisque lorsque je me loggue avec des identifiants enregistrés auparavant avec pdo, je suis reconnue.

Merci d'avance pour vos lumières. Thank u


Inscription.php

<?php 
session_start();

if (isset($_SESSION['pseudo']) && isset($_SESSION['password']))  { $pseudo = $_SESSION['pseudo'];$password = $_SESSION['password']; header('Location:index.php');  } 
else if (isset($_COOKIE['pseudo']) && isset($_COOKIE['password']))  {$pseudo = $_SESSION['pseudo']; $password = $_COOKIE['password']; header('Location:index.php'); } 
else { 


if(isset($_POST['submit']) && !empty($_POST['submit']) ) 
{  $valid = true;   
      
 $pseudo=htmlspecialchars(trim($_POST["pseudo"])); 
   $password=htmlspecialchars(trim($_POST["password"])); 
   $repeatpassword=htmlspecialchars(trim($_POST["repeatpassword"])); 
   $email=htmlspecialchars(trim($_POST["email"]));
   $civilite=htmlspecialchars(trim($_POST["civilite"])); 
   $nom=htmlspecialchars(trim($_POST["nom"])); 
   $prenom=htmlspecialchars(trim($_POST["prenom"])); 
   $societe=htmlspecialchars(trim($_POST["societe"])); 
   $adresse=htmlspecialchars(trim($_POST["adresse"])); 
   $adresse2=htmlspecialchars(trim($_POST["adresse2"])); 
   $cp=htmlspecialchars(trim($_POST["cp"])); 
   $ville=htmlspecialchars(trim($_POST["ville"]));   
   $pays=htmlspecialchars(trim($_POST["pays"]));        
   $tel=htmlspecialchars(trim($_POST["tel"]));  
  
  	
	if ( empty($_POST['password']))
	   {$valid=false;
		$erreurpassword = "Mot de passe requis";
	   }
	
	if ( strlen($_POST['password']) <6 )
	   {$valid=false;
		$erreurpassword = "6 caractères minimum";
	   }
	   
	if ( empty($_POST['repeatpassword']))
	   {$valid=false;
		$erreurpassword2 = "Répétez votre mot de passe";
	   }
	
	if ($_POST['repeatpassword'] != $_POST['repeatpassword'])
	   {$valid=false;
		$erreurpassword2 = "Les mots de passe doivent être identiques";
	   }else{$password=md5($password); }
	   
	   
 
	   
	if ( empty($_POST['civilite']))
	   {$valid=false;
		$erreurcivilite = "Veuillez indiquer votre civilité";
	   }
	
	if ( empty($_POST['nom']))
	   {$valid=false;
		$erreurnom = "Veuillez indiquer votre nom";
	   }
	
	if ( empty($_POST['prenom']))
	   {$valid=false;
		$erreurprenom =  "Veuillez indiquer votre prénom";
	   }
	   
	if ( empty($_POST['adresse']))
	   {$valid=false;
		$erreuradresse = "Veuillez indiquer votre adresse";
	   }
	   
	if ( empty($_POST['cp']))
	   {$valid=false;
		$erreurcp = "Veuillez indiquer votre code postal";
	   }
	      
    if ( empty($_POST['ville']))
       {$valid = false;
        $erreurville = "Veuillez indiquer votre ville";
       }

	if ( empty($_POST['pays']))
	   {$valid=false;
		$erreurpays = "Veuillez indiquer votre pays";
	   }
	   
	if ( empty($_POST['tel']))
       {$valid=false;
        $erreurtel = "Veuillez indiquer votre numéro de téléphone";
       }
	if (!preg_match(" '([-. ]?[0-9]{2}){4}' ", $_POST['tel']))   
	   {$valid=false;
	    $erreurtel = " 10 chiffres requis";
	   }  
	   


    if ($valid)
	   
	   {  include('mysql_connect_pivoine.php');
		   $pseudo=mysql_real_escape_string(htmlspecialchars($_POST["pseudo"])); 
		   $password=mysql_real_escape_string(htmlspecialchars($_POST["password"])); 
		   $repeatpassword=mysql_real_escape_string(htmlspecialchars($_POST["repeatpassword"])); 
		   $email=mysql_real_escape_string(htmlspecialchars($_POST["email"]));
		   $civilite=mysql_real_escape_string(htmlspecialchars($_POST["civilite"])); 
		   $nom=mysql_real_escape_string(htmlspecialchars($_POST["nom"])); 
		   $prenom=mysql_real_escape_string(htmlspecialchars($_POST["prenom"])); 
		   $societe=mysql_real_escape_string(htmlspecialchars($_POST["societe"])); 
		   $adresse=mysql_real_escape_string(htmlspecialchars($_POST["adresse"])); 
		   $adresse2=mysql_real_escape_string(htmlspecialchars($_POST["adresse2"])); 
		   $cp=mysql_real_escape_string(htmlspecialchars($_POST["cp"])); 
		   $ville=mysql_real_escape_string(htmlspecialchars($_POST["ville"]));   
		   $pays=mysql_real_escape_string(htmlspecialchars($_POST["pays"]));        
		   $tel=mysql_real_escape_string(htmlspecialchars($_POST["tel"]));      
   

   
		 $query =("INSERT INTO users (id, pseudo, password, email, civilite, nom, prenom, societe, adresse, adresse2, cp, ville, pays,  tel) 
		VALUES  ('', '$pseudo', '$password', '$email','$civilite','$nom', '$prenom','$societe', '$adresse', '$adresse2', '$cp', '$ville', '$pays', '$tel') ")
		 or die(mysql_error() );
		 
		 header('Location:inscription_ok.php');
		} 
        

 }   
/**************************************************** form SUBMIT 2 FACTURATION DIFFERENTE  ******************************************************************/
elseif(isset($_POST['submit2']) && !empty($_POST['submit2'])) 
{

   $valid = true;
   $pseudo=htmlspecialchars(trim($_POST["pseudo"])); 
   $password=htmlspecialchars(trim($_POST["password"])); 
   $repeatpassword=htmlspecialchars(trim($_POST["repeatpassword"])); 
   $email=htmlspecialchars(trim($_POST["email"]));
   $civilite=htmlspecialchars(trim($_POST["civilite"])); 
   $nom=htmlspecialchars(trim($_POST["nom"])); 
   $prenom=htmlspecialchars(trim($_POST["prenom"])); 
   $societe=htmlspecialchars(trim($_POST["societe"])); 
   $adresse=htmlspecialchars(trim($_POST["adresse"])); 
   $adresse2=htmlspecialchars(trim($_POST["adresse2"])); 
   $cp=htmlspecialchars(trim($_POST["cp"])); 
   $ville=htmlspecialchars(trim($_POST["ville"]));   
   $pays=htmlspecialchars(trim($_POST["pays"]));        
   $tel=htmlspecialchars(trim($_POST["tel"]));      

   $civilite_facturation=htmlspecialchars(trim($_POST["civilite_facturation"])); 
   $nom_facturation=htmlspecialchars(trim($_POST["nom_facturation"])); 
   $prenom_facturation=htmlspecialchars(trim($_POST["prenom_facturation"])); 
   $societe_facturation=htmlspecialchars(trim($_POST["societe_facturation"])); 
   $adresse_facturation=htmlspecialchars(trim($_POST["adresse_facturation"])); 
   $adresse2_facturation=htmlspecialchars(trim($_POST["adresse2_facturation"])); 
   $cp_facturation=htmlspecialchars(trim($_POST["cp_facturation"])); 
   $ville_facturation=htmlspecialchars(trim($_POST["ville_facturation"]));   
   $pays_facturation=htmlspecialchars(trim($_POST["pays_facturation"]));   
   $email_facturation=htmlspecialchars(trim($_POST["email_facturation"]));   
   $tel_facturation=htmlspecialchars(trim($_POST["tel_facturation"]));  
   
   
	if (empty($_POST['password']))
	   {$valid=false;
		$erreurpassword = "Mot de passe requis";
	   }
	
	if ( strlen($_POST['password']) <6 )
	   {$valid=false;
		$erreurpassword = "6 caractères minimum";
	   }
	   
	if ( empty($_POST['repeatpassword']))
	   {$valid=false;
		$erreurpassword2 = "Répétez votre mot de passe";
	   }
	
	if ($_POST['repeatpassword'] != $_POST['repeatpassword'])
	   {$valid=false;
		$erreurpassword2 = "Les mots de passe doivent être identiques";
	   }else{$password=md5($password); }
	   
	   
	if (! preg_match( "#[a-z0-9._-]+@[a-z0-9._-][^@]+\.[a-z]{2,3}#", $_POST['email']))  /* '#^[\w.-]+@[\w.-]+\.[a-zA-Z]{2,6}$#'*/
	   {$valid=false;
	   $erreuremail = "Votre adresse e-mail n'est pas valide";
	   }
	   
	if ( empty($_POST['civilite']))
	   {$valid=false;
		$erreurcivilite = "Veuillez indiquer votre civilité";
	   }
	
	if ( empty($_POST['nom']))
	   {$valid=false;
		$erreurnom = "Veuillez indiquer votre nom";
	   }
	
	if ( empty($_POST['prenom']))
	   {$valid=false;
		$erreurprenom =  "Veuillez indiquer votre prénom";
	   }
	   
	if ( empty($_POST['adresse']))
	   {$valid=false;
		$erreuradresse = "Veuillez indiquer votre adresse";
	   }
	   
	if ( empty($_POST['cp']))
	   {$valid=false;
		$erreurcp = "Veuillez indiquer votre code postal";
	   }
	      
    if ( empty($_POST['ville']))
       {$valid = false;
        $erreurville = "Veuillez indiquer votre ville";
       }

	if ( empty($_POST['pays']))
	   {$valid=false;
		$erreurpays = "Veuillez indiquer votre pays";
	   }
	      
	if ( empty($_POST['tel']))
       {$valid=false;
        $erreurtel = "Veuillez indiquer votre numéro de téléphone";
       }
	if (!preg_match(" '([-. ]?[0-9]{2}){4}' ", $_POST['tel']))   
	   {$valid=false;
	    $erreurtel = " 10 chiffres";
	   }  
	   
	   
if ( empty($_POST['civilite_facturation']))
	   {$valid=false;
		$erreurcivilite_facturation = "Champ à renseigner";        
	   }
	
	if ( empty($_POST['nom_facturation']))
	   {$valid=false;
		$erreurnom_facturation = "Champ à renseigner";
	   }
	
	if ( empty($_POST['prenom_facturation']))
	   {$valid=false;
		$erreurprenom_facturation =  "Champ à renseigner";
	   }
	   
	if ( empty($_POST['adresse_facturation']))
	   {$valid=false;
		$erreuradresse_facturation = "Champ à renseigner";
	   }
	   
	if ( empty($_POST['cp_facturation']))
	   {$valid=false;
		$erreurcp_facturation = "Champ à renseigner";
	   }
	      
    if (  empty($_POST['ville_facturation']))
       {$valid = false;
        $erreurville_facturation = "Champ à renseigner";
       }

	if ( empty($_POST['pays_facturation']))
	   {$valid=false;
		$erreurpays_facturation = "Champ à renseigner";
	   }
	   
    if ( empty($_POST['email_facturation']))
       {$valid=false;
        $erreuremail_facturation = "Champ à renseigner";
       }
	   
	if (! preg_match( "#[a-z0-9._-]+@[a-z0-9._-][^@]+\.[a-z]{2,3}#", $_POST['email_facturation']))  /* '#^[\w.-]+@[\w.-]+\.[a-zA-Z]{2,6}$#'*/
	   {$valid=false;
	   $erreuremail_facturation = "Cette adresse e-mail n'est pas valide";
	   }
	   
	if (empty($_POST['tel_facturation']))
       {$valid=false;
        $erreurtel_facturation = "Veuillez indiquer votre numéro de téléphone";
       }
	if (!preg_match(" '([-. ]?[0-9]{2}){4}' ", $_POST['tel_facturation']))   
	   {$valid=false;
	    $erreurtel_facturation = " 10 chiffres";
	   }  

    if ($valid)
	   {  include('mysql_connect_pivoine.php') ; 
	      
		   $pseudo=mysql_real_escape_string(htmlspecialchars($_POST["pseudo"])); 
		   $password=mysql_real_escape_string(htmlspecialchars($_POST["password"])); 
		   $repeatpassword=mysql_real_escape_string(htmlspecialchars($_POST["repeatpassword"])); 
		   $email=mysql_real_escape_string(htmlspecialchars($_POST["email"]));
		   $civilite=mysql_real_escape_string(htmlspecialchars($_POST["civilite"])); 
		   $nom=mysql_real_escape_string(htmlspecialchars($_POST["nom"])); 
		   $prenom=mysql_real_escape_string(htmlspecialchars($_POST["prenom"])); 
		   $societe=mysql_real_escape_string(htmlspecialchars($_POST["societe"])); 
		   $adresse=mysql_real_escape_string(htmlspecialchars($_POST["adresse"])); 
		   $adresse2=mysql_real_escape_string(htmlspecialchars($_POST["adresse2"])); 
		   $cp=mysql_real_escape_string(htmlspecialchars($_POST["cp"])); 
		   $ville=mysql_real_escape_string(htmlspecialchars($_POST["ville"]));   
		   $pays=mysql_real_escape_string(htmlspecialchars($_POST["pays"]));        
		   $tel=mysql_real_escape_string(htmlspecialchars($_POST["tel"]));      
		
		   $civilite_facturation=mysql_real_escape_string(htmlspecialchars($_POST["civilite_facturation"])); 
		   $nom_facturation=mysql_real_escape_string(htmlspecialchars($_POST["nom_facturation"])); 
		   $prenom_facturation=mysql_real_escape_string(htmlspecialchars($_POST["prenom_facturation"])); 
		   $societe_facturation=mysql_real_escape_string(htmlspecialchars($_POST["societe_facturation"])); 
		   $adresse_facturation=mysql_real_escape_string(htmlspecialchars($_POST["adresse_facturation"])); 
		   $adresse2_facturation=mysql_real_escape_string(htmlspecialchars($_POST["adresse2_facturation"])); 
		   $cp_facturation=mysql_real_escape_string(htmlspecialchars($_POST["cp_facturation"])); 
		   $ville_facturation=mysql_real_escape_string(htmlspecialchars($_POST["ville_facturation"]));   
		   $pays_facturation=mysql_real_escape_string(htmlspecialchars($_POST["pays_facturation"]));   
		   $email_facturation=mysql_real_escape_string(htmlspecialchars($_POST["email_facturation"]));   
		   $tel_facturation=mysql_real_escape_string(htmlspecialchars($_POST["tel_facturation"]));  

   
	   	 
		 $query =("INSERT INTO users (id, pseudo, password, email, civilite, nom, prenom, societe, adresse, adresse2, cp, ville, pays,  tel,  civilite_facturation,  
		          nom_facturation, prenom_facturation, societe_facturation, adresse_facturation, adresse2_facturation, cp_facturation, ville_facturation, 
				  pays_facturation, email_facturation, tel_facturation ) 
		          VALUES  ('', '$pseudo', '$password', '$email', '$civilite','$nom', '$prenom','$societe', '$adresse', '$adresse2', '$cp', '$ville', '$pays',  '$tel', 		                           '$civilite_facturation' ,'$nom_facturation','$prenom_facturation','$societe_facturation','$adresse_facturation','$adresse2_facturation',                             '$cp_facturation','$ville_facturation','$pays_facturation','$email_facturation','$tel_facturation') ") 
		 or die(mysql_error() );
		 
		 header('Location:inscription_ok.php');
        } 
		
		
 }  

else {$valid =false; } 
}
?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="PivoineMercerie.css" />
<script type="text/javascript" src="js/jquery-1.10.2.min.js"> </script>
<script type="text/javascript" src="js/pivoine.js"> </script>



</head>
<title>Pivoine Mercerie en ligne Marmande </title>
</head>
<body class="body2">
<!--<img src="img/Pivoine_inverted.jpg" alt="" id="bglong" /> -->


 <div class="conteneur_principal_index">
<div class="head"> Pivoine Mercerie </div>



<div id="menu">
  <ul id="onglets">
    <li><a href="index.php"> Accueil </a></li>
    <li><a href="mercerie_boutique_en_ligne.php"> Boutique en ligne </a></li>
    <li  class="active"><a href="inscription.php"> Créer un compte </a></li>
    <li><a href="connexion.php"> Se connecter </a></li>
    <li><a href="mon_compte.php"> Mon compte </a></li>
    <li><a href="panier.php"> Mon panier </a></li>
    <li><a href="map.php"> Contact </a></li>
  </ul>
</div>


<div class="adresse"> <span class="pivoine_adresse"> Pivoine Mercerie</span><br /> 
8, Rue des Marcassins<br />
 47200 Marmande</div>

<div class="enregistrement">
<p> <span class="inscription_titre"> Créer mon compte </span>
<br /><br /> <span class="rose80"> (Tous les champs marqués d'une * sont requis) </span></p>  



<form name="registration" id="registration" action="" method="post">

<fieldset id="identifiants_registration">
 <legend > Mes identifiants </legend> 		
 <p >  
    <label for="pseudo" id="label_pseudo"> Pseudo : *</label><br />
    <input type="text" name="pseudo" id="pseudo" class="field" placeholder=" 6 caractères minimum" size="30" maxlength="70" tabindex="10" 
    value="<?php if(isset($pseudo)) echo $pseudo; ?>" /> 
     <span class="error_message_pseudo">  </span>
    <br />
    <br />
    						
<script src="jquery.js" type="text/javascript"> </script>
<script src="js/verifpseudo.js" type="text/javascript"> </script>



    <label for="password" id="label_pass"> Mot de passe : *</label> <br />
    <input type="password" name="password" id="password_connexion" class="field" placeholder=" 6 caractères minimum" size="30" maxlength="70" tabindex="20"/>    
    <span class="error_message"> <?php if (isset($erreurpassword)) echo $erreurpassword; ?> </span>
    <br />
    <br />
     
    <label for="password" id="label_pass2"> Retapez votre mot de passe : * </label>   <br /> 
    <input type="password" name="repeatpassword" id="password_connexion" class="field" size="30" maxlength="70" tabindex="30" />    
    <span class="error_message"> <?php if (isset($erreurpassword2)) echo $erreurpassword2;  ?> </span>
                                      <br /><br />
  
   <label for="email" id="label_email"> Email : * </label> <br />
    <input type="text" name="email" id="email" class="field" size="30" maxlength="70" tabindex="31"  value="<?php if (isset($email)) echo $email; ?>" /> 
    <span class="error_message_email">  </span>
    <span class="error_message"> <?php if(isset($erreuremail)) echo $erreuremail;?> </span>
    
	                                    
    <script src="jquery.js" type="text/javascript"> </script>
    <script src="js/verif_email.js" type="text/javascript"> </script>
<br /><br />
 </p> 
</fieldset> 
   
   
 <fieldset id="coordonnees_registration">
    <legend> Mon adresse de livraison </legend> 		
<p> 
    <label for="civilite"  id="label_civilite" > Civilit&eacute; : * </label><br />
    <select name="civilite" id="civilite" class="field" tabindex="40" /> 
    <option selected="selected" value="">  </option>
<?php 
    $selected = isset( $civilite ) ? $civilite : "" ;
    $selectedValue = 'selected="selected"';
?>
    <option value="Mlle" <?php if ($selected == "Mlle") echo  $selectedValue ; ?>> Mlle </option>
    <option value="Mme" <?php if ($selected == "Mme") echo  $selectedValue ; ?>> Mme </option>
    <option value="Mr" <?php if ($selected == "Mr") echo  $selectedValue ; ?>> Mr </option> 
    </select>
    <span class="error_message"> <?php if(isset($erreurcivilite)) echo $erreurcivilite ; ?> </span>
    <br /><br />

 
    <label for="nom" id="label_nom"> Nom : * </label><br />
    <input type="text" name="nom" id="nom" class="field" size="30" maxlength="70" tabindex="60" value="<?php if (isset($nom)) echo $nom; ?>"/> 
    <span class="error_message"> <?php if (isset($erreurnom)) echo $erreurnom ; ?> </span>  
    <br />
    <br />
    <label for="prenom" id="label_prenom"> Prénom : *</label> <br />   
    <input type="text" name="prenom" id="prenom" class="field" size="30" maxlength="70" tabindex="70" value="<?php if (isset($prenom)) echo $prenom; ?>"/>
    <span class="error_message"> <?php if (isset($erreurprenom)) echo $erreurprenom ; ?> </span>    <br /><br />

    <label for="societe" id="label_societe"> Société :</label> <br />   
    <input type="text" name="societe" id="societe" class="field" size="30" maxlength="70" tabindex="75" value="<?php if (isset($societe)) echo $societe; ?>"/>
    <span class="error_message"> <?php if (isset($erreursociete)) echo $erreursociete ; ?> </span>    <br /><br /> 
       
    <label for="adresse" id="label_adresse"> Adresse : * </label>  <br />  
    <input type="text" name="adresse" id="adresse" class="field" size="30" maxlength="100" tabindex="80" value="<?php if (isset($adresse)) echo $adresse; ?>"/> 
    <span class="error_message"> <?php if (isset($erreuradresse)) echo $erreuradresse ; ?> </span>   <br /> <br />
    
    <label for="adresse" id="label_adresse2"> Complément d'adresse : </label>  <br />
    <input type="text" name="adresse2" id="adresse2" class="field" size="30" maxlength="100" tabindex="90" value="<?php if (isset($adresse2)) echo $adresse2; ?>"/>  <br /><br />
     
    <label for="cp" id="label_cp"> Code postal : * </label>  <br />  
    <input type="text" name="cp" id="cp" class="field" size="20"  maxlength="30" tabindex="100" value="<?php if (isset($cp)) echo $cp; ?>"/> 
    <span class="error_message"> <?php if (isset($erreurcp)) echo $erreurcp ; ?> </span>   <br /><br /> 
    
    <label for="ville" id="label_ville"> Ville : * </label>  <br />  
    <input type="text" name="ville" id="ville" class="field" size="30" maxlength="100" tabindex="110" value="<?php if (isset($ville)) echo $ville ; ?>" /> 
    <span class="error_message"> <?php if(isset($erreurville)) echo $erreurville ; ?> </span>   <br /><br />
    
    <label for="cpays" id="label_pays"> Pays : * </label>  <br />  
    <input type="text" name="pays" id="pays" class="field" size="30" maxlength="100" tabindex="120" value="<?php if (isset($pays)) echo $pays; ?>" />
    <span class="error_message"> <?php if(isset($erreurpays)) echo $erreurpays; ?> </span>    <br /><br />
   
    <label for="tel" id="label_tel"> Téléphone : *</label> <br />
    <input type="text" name="tel" id="tel" class="field" placeholder=" 10 chiffres sans espace" size="30" maxlength="70" tabindex="140" value="<?php if (isset($tel)) echo $tel; ?>" />   <span class="error_message"> <?php if (isset($erreurtel)) echo $erreurtel;  ?></span>


      <br /><br />
     <input type="checkbox" name="check_livfact" id="check_livfact"   tabindex="160" />
     <label for="livraisonfacturation" id="label_livraisonfacturation"> Utiliser mon adresse de livraison comme adresse de facturation</label>
     <br /><br />
     
     <input type="submit" name="submit" id="submit" value="Envoyer"  tabindex="150" />
     
 
     <br /><br /><br />
</p>     

  </fieldset> 

<div id="div_coordonnees_facturation">
 <fieldset id="coordonnees_facturation">
    <legend> Mon adresse de facturation - si différente de l'adresse de livraison </legend> 		

<p>
    <label for="civilite_facturation"  id="label_civilite_facturation" > Civilit&eacute; : * </label><br />
    <select name="civilite_facturation" id="civilite_facturation" class="field" tabindex="40" /> 
    <option selected="selected" value="">  </option>
<?php 
    $selected_a = isset( $civilite_facturation ) ? $civilite_facturation : "" ;
    $selectedValue_a = 'selected="selected"';
?>
    <option value="Mlle" <?php if ($selected_a == "Mlle") echo  $selectedValue_a ; ?>> Mlle </option>
    <option value="Mme" <?php if ($selected_a == "Mme") echo  $selectedValue_a ; ?>> Mme </option>
    <option value="Mr" <?php if ($selected_a == "Mr") echo  $selectedValue_a ; ?>> Mr </option> 
    </select>
    <span class="error_message"> <?php if(isset($erreurcivilite)) echo $erreurcivilite; ?> </span>
    <br /><br />
 
    <label for="nom" id="label_nom_facturation"> Nom : * </label><br />
    <input type="text" name="nom_facturation" id="nom" size="30" maxlength="70"  tabindex="180"  
    value="<?php if(isset($nom_facturation)) echo $nom_facturation; ?>"  />   
    <br />
    <br />
    <label for="prenom" id="label_prenom_facturation"> Prénom : *</label> <br />   
    <input type="text" name="prenom_facturation" id="prenom" size="30" maxlength="70" tabindex="190"
    value="<?php if(isset($prenom_facturation)) echo $prenom_facturation; ?>" />    <br /><br />

    <label for="societe" id="label_societe_facturation"> Société :</label> <br />   
    <input type="text" name="societe_facturation" id="societe" size="30" maxlength="70" tabindex="200" 
    value="<?php if(isset($societe_facturation)) echo $societe_facturation; ?>"/>    <br /><br /> 
       
    <label for="adresse" id="label_adresse_facturation"> Adresse : * </label>  <br />  
    <input type="text" name="adresse_facturation" id="adresse" size="30" maxlength="100" tabindex="210" 
    value="<?php if(isset($adresse_facturation)) echo $adresse_facturation; ?>"/>    <br /> <br />
    
    <label for="adresse" id="label_adresse2_facturation"> Complément d'adresse : </label>  <br />
    <input type="text" name="adresse2_facturation" id="adresse2" size="30" maxlength="100" tabindex="220" 
     value="<?php if(isset($adresse2_facturation)) echo $adresse2_facturation; ?>"/>  <br /><br />
     
    <label for="cp" id="label_cp_facturation"> Code postal : * </label>  <br />  
    <input type="text" name="cp_facturation" id="cp" size="20" maxlength="30" tabindex="230" 
     value="<?php if(isset($cp_facturation)) echo $cp_facturation; ?>"/>    <br /><br /> 
    
    <label for="ville" id="label_ville_facturation"> Ville : * </label>  <br />  
    <input type="text" name="ville_facturation" id="ville" size="30" maxlength="100" tabindex="240" 
     value="<?php if(isset($ville_facturation)) echo $ville_facturation; ?>"/>    <br /><br />
    
    <label for="cpays" id="label_pays_facturation"> Pays : * </label>  <br />  
    <input type="text" name="pays_facturation" id="pays" size="30" maxlength="100" tabindex="250" 
     value="<?php if(isset($pays_facturation)) echo $pays_facturation; ?>"/>    <br /><br />
    
    
     <label for="email" id="label_email_facturation"> Email : * </label> <br />   
    <input type="text" name="email_facturation" id="email_facturation" size="30" maxlength="70" tabindex="260"
     value="<?php if(isset($email_facturation)) echo $email_facturation; ?>" />    <br /><br />
    
    <label for="tel" id="label_tel_facturation"> Téléphone : *</label><br />    
    <input type="text" name="tel_facturation" id="tel" placeholder=" 10 chiffres sans espace" size="30" maxlength="70" tabindex="270" 
     value="<?php if(isset($tel_facturation)) echo $tel_facturation; ?>"/>   


 </p>
      <br /><br />
    <input type="submit" name="submit2" id="submit2" value="Envoyer"   tabindex="280" />


  </fieldset> 
</div>
</form>
</div>


</div>


</body>
</html>

Modifié par Vape6 (27 Sep 2013 - 13:55)
		 $query =("INSERT INTO users (id, pseudo, password, email, civilite, nom, prenom, societe, adresse, adresse2, cp, ville, pays,  tel) 
		VALUES  ('', '$pseudo', '$password', '$email','$civilite','$nom', '$prenom','$societe', '$adresse', '$adresse2', '$cp', '$ville', '$pays', '$tel') ")
		 or die(mysql_error() );
		 
		 header('Location:inscription_ok.php');

Ben... ne serait-ce pas qu'il manque l'appel à mysql_query ?

Et puis, comme aime à le rappeler Lothindil... il faut passer à mysqli !
Modifié par petibato (27 Sep 2013 - 16:37)
Salut,

Merci pour ta réponse, j'ai déjà testé en remplaçant $query = ("INSERT;...) par mysql_query("INSERT INTO..), mais rien n'y fait... Je viens de re-checker et idem, lorsque j'essaie de me connecter : login et mot de passe incorrects.
Wep merci, c'était ça et à force de remettre tout mon code en question, et d'abrutissement sur mon pc, j'ai remplacé des expressions ou bouts de code par d'autres trouvés ici et là sur le web. et voila.

Merci, Smiley confused je suis confuse.. lol. Mais merci d'avoir vérifié !
petibato a écrit :
Et puis, comme aime à le rappeler Lothindil... il faut passer à mysqli !
C'est tout à fait ça ^^

(cfr ma signature) Smiley lol