Formulaire php
Fermé
jérémy1664
Messages postés
165
Date d'inscription
lundi 4 juin 2007
Statut
Membre
Dernière intervention
3 juillet 2008
-
5 juin 2007 à 09:46
youplaboum - 5 juin 2007 à 14:52
youplaboum - 5 juin 2007 à 14:52
A voir également:
- Formulaire php
- Formulaire de réclamation facebook - Guide
- Easy php - Télécharger - Divers Web & Internet
- Formulaire de reclamation instagram - Guide
- Le formulaire rempli - Guide
- Confirmer le nouvel envoi du formulaire err_cache_miss - Forum Google Chrome
7 réponses
Dalida
Messages postés
6728
Date d'inscription
mardi 14 mai 2002
Statut
Contributeur
Dernière intervention
11 janvier 2016
922
5 juin 2007 à 09:49
5 juin 2007 à 09:49
salut,
mais c'est quoi le problème ?
ça bloque où ? avec message d'erreur ? si oui, lequel…
et merci de taper toutes les lettres !
-;o)
à plus !
mais c'est quoi le problème ?
ça bloque où ? avec message d'erreur ? si oui, lequel…
et merci de taper toutes les lettres !
-;o)
à plus !
jérémy1664
Messages postés
165
Date d'inscription
lundi 4 juin 2007
Statut
Membre
Dernière intervention
3 juillet 2008
4
5 juin 2007 à 10:06
5 juin 2007 à 10:06
premierement il me trouve une erreur a la ligne 75
ensuite :
Fatal error: Cannot redeclare validcp() (previously declared in d:\programmation\fonctions\fonction_valid.php:8) in d:\programmation\fonctions\fonction_valid.php on line 8
je suis vraiment perdu parce que ma fonction n'est déclarée qu'une seule fois dans la feuille (fonctions\fonction_valid.php)
Je pense que je fais des erreurs dans les appels de fonctions ou des différentes pages.
ensuite :
Fatal error: Cannot redeclare validcp() (previously declared in d:\programmation\fonctions\fonction_valid.php:8) in d:\programmation\fonctions\fonction_valid.php on line 8
je suis vraiment perdu parce que ma fonction n'est déclarée qu'une seule fois dans la feuille (fonctions\fonction_valid.php)
Je pense que je fais des erreurs dans les appels de fonctions ou des différentes pages.
Dalida
Messages postés
6728
Date d'inscription
mardi 14 mai 2002
Statut
Contributeur
Dernière intervention
11 janvier 2016
922
5 juin 2007 à 10:52
5 juin 2007 à 10:52
pour ta bdd, utilise des noms de champ en minuscules et change le nom 'Date', c'est un mot réservé de SQL !!!
jérémy1664
Messages postés
165
Date d'inscription
lundi 4 juin 2007
Statut
Membre
Dernière intervention
3 juillet 2008
4
5 juin 2007 à 10:16
5 juin 2007 à 10:16
Il m'en voi aussi quand j'ai validé le formulaire :
The requested URL /test3/index.php was not found on this server.
Je suis d'accord avec ça mais moi je veux envoyer les visiteur sur index.php et non sur : test3/index.php
The requested URL /test3/index.php was not found on this server.
Je suis d'accord avec ça mais moi je veux envoyer les visiteur sur index.php et non sur : test3/index.php
jérémy1664
Messages postés
165
Date d'inscription
lundi 4 juin 2007
Statut
Membre
Dernière intervention
3 juillet 2008
4
5 juin 2007 à 10:56
5 juin 2007 à 10:56
Mais je n'ai pas vraiment de problèmes avec ma base de donnée je vais quand même essayer mais je ne pense pas que le problème vient de ma bdd
Dalida
Messages postés
6728
Date d'inscription
mardi 14 mai 2002
Statut
Contributeur
Dernière intervention
11 janvier 2016
922
5 juin 2007 à 11:02
5 juin 2007 à 11:02
utiliser un mot réservé est un problème en soit que tu aies déjà levé une erreur ou pas, je ne te dis pas ça pour chipoter !
qu'y a-t-il dans 'test4.php' ?
qu'y a-t-il dans 'test4.php' ?
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question
jérémy1664
Messages postés
165
Date d'inscription
lundi 4 juin 2007
Statut
Membre
Dernière intervention
3 juillet 2008
4
5 juin 2007 à 11:04
5 juin 2007 à 11:04
Dans test4.php il y a mon formulaire en html
Dalida
Messages postés
6728
Date d'inscription
mardi 14 mai 2002
Statut
Contributeur
Dernière intervention
11 janvier 2016
922
5 juin 2007 à 11:08
5 juin 2007 à 11:08
oui, merci…
pourrais-tu nous montrer ce que cela donne ?
c'est dans le 'action' du <form> que tu définies le script à exécuter et ça doit être là qu'il y a l'erreur d'url.
pourrais-tu nous montrer ce que cela donne ?
c'est dans le 'action' du <form> que tu définies le script à exécuter et ça doit être là qu'il y a l'erreur d'url.
jérémy1664
Messages postés
165
Date d'inscription
lundi 4 juin 2007
Statut
Membre
Dernière intervention
3 juillet 2008
4
>
Dalida
Messages postés
6728
Date d'inscription
mardi 14 mai 2002
Statut
Contributeur
Dernière intervention
11 janvier 2016
5 juin 2007 à 11:15
5 juin 2007 à 11:15
Voici mon formulaire :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//en">
<html>
<head>
<title>- test - </title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<table border="0" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<h1 height="29"><td valign="top" border="0" align="center" class="titreP"></td></h1>
</tr>
<table align="center" cellspacing="0">
<form action="index.php?mod=inscription" method="post" enctype="multipart/form-data">
<tr></br></br></br>
<td colspan="2" bgcolor="#E6E6E6"><p align="center"><br><b>Inscrivez vous : </b><br></td>
</tr>
<tr>
<td height="5" bgcolor="#E6E6E6" width="218" align="right">Email : </td>
<td height="5" bgcolor="#E6E6E6" width="249" ><input type="text" size="30" maxlength="255" name="Email" value=""><span class="red">*</span></td>
</tr>
<tr>
<td height="5" bgcolor="#E6E6E6" width="218" align="right">Mot de passe : </td>
<td height="5" bgcolor="#E6E6E6" width="249" ><input type="password" size="30" name="Mot_Passe" value=""><span class="red">*</span></td>
</tr>
<tr>
<td height="5" bgcolor="#E6E6E6" width="218" align="right">Phrase mot de passe : </td>
<td height="5" bgcolor="#E6E6E6" width="249" ><input type="text" size="30" maxlength="255" name="Phrase_Mot_Passe" value=""></td>
</tr>
<tr>
<td height="5" bgcolor="#E6E6E6" width="218" align="right">Nom : </td>
<td height="5" bgcolor="#E6E6E6" width="249" ><input type="text" size="30" maxlength="255" name="Nom" value=""><span class="red">*</span></td>
</tr>
<tr>
<td height="5" bgcolor="#E6E6E6" width="218" align="right">Prénom : </td>
<td height="5" bgcolor="#E6E6E6" width="249" ><input type="text" size="30" maxlength="255" name="Prenom" value=""><span class="red">*</span></td>
</tr>
<tr>
<td height="5" bgcolor="#E6E6E6" width="218" align="right">Société : </td>
<td height="5" bgcolor="#E6E6E6" width="249" ><input type="text" size="30" maxlength="255" name="Societe" value=""><span class="red">*</span></td>
</tr>
<tr>
<td height="5" bgcolor="#E6E6E6" width="218" align="right">Adresse : </td>
<td height="5" bgcolor="#E6E6E6" width="249" ><textarea type="text" size="35" maxlength="255" name="Adresse" value=""></textarea><span class="red">*</span></td>
</tr>
<tr>
<td height="5" bgcolor="#E6E6E6" width="218" align="right">Code Postal : </td>
<td height="5" bgcolor="#E6E6E6" width="249" ><input type="text" size="30" maxlength="255" name="Cp" value=""><span class="red">*</span></td>
</tr>
<tr>
<td height="5" bgcolor="#E6E6E6" width="218" align="right">Ville : </td>
<td height="5" bgcolor="#E6E6E6" width="249" ><input type="text" size="30" maxlength="255" name="Ville" value=""><span class="red">*</span></td>
</tr>
<tr>
<td height="5" bgcolor="#E6E6E6" width="218" align="right">Pays : </td>
<td height="5" bgcolor="#E6E6E6" width="249" ><input type="text" size="30" maxlength="255" name="Pays" value=""><span class="red">*</span></td>
</tr>
<tr>
<td height="5" bgcolor="#E6E6E6" width="218" align="right">Etat : </td>
<td height="5" bgcolor="#E6E6E6" width="249" ><input type="text" size="30" maxlength="255" name="Etat" value=""></td>
</tr>
<tr>
<td height="5" bgcolor="#E6E6E6" width="218" align="right">Téléphone (standard) : </td>
<td height="5" bgcolor="#E6E6E6" width="249" ><input type="text" size="30" maxlength="255" name="Tel_Standard" value=""></td>
</tr>
<tr>
<td height="5" bgcolor="#E6E6E6" width="218" align="right">Téléphone (Direct) : </td>
<td height="5" bgcolor="#E6E6E6" width="249" ><input type="text" size="30" maxlength="255" name="Tel_Direct" value=""><span class="red">*</span></td>
</tr>
<tr>
<td height="5" bgcolor="#E6E6E6" width="218" align="right">Téléphone (portable) : </td>
<td height="5" bgcolor="#E6E6E6" width="249" ><input type="text" size="30" maxlength="255" name="Tel_Portable" value=""></td>
</tr>
<tr>
<td height="5" bgcolor="#E6E6E6" width="218" align="right">Fax (standard) : </td>
<td height="5" bgcolor="#E6E6E6" width="249" ><input type="text" size="30" maxlength="255" name="Fax_Standard" value=""></td>
</tr>
<tr>
<td height="5" bgcolor="#E6E6E6" width="218" align="right">Fax (direct) : </td>
<td height="5" bgcolor="#E6E6E6" width="249" ><input type="text" size="30" maxlength="255" name="Fax_Direct" value=""><span class="red">*</span></td>
</tr>
<tr>
<td height="5" bgcolor="#E6E6E6" width="218" align="right">Service : </td>
<td height="5" bgcolor="#E6E6E6" width="249" ><input type="text" size="30" maxlength="255" name="Service" value=""></td>
</tr>
<tr>
<td height="5" bgcolor="#E6E6E6" width="218" align="right">Batiment : </td>
<td height="5" bgcolor="#E6E6E6" width="249" ><input type="text" size="30" maxlength="255" name="Batiment" value=""></td>
</tr>
<tr>
<td height="5" bgcolor="#E6E6E6" width="218" align="right">Observation : </td>
<td height="5" bgcolor="#E6E6E6" width="280" ><textarea type="text" size="30" maxlength="255" name="Observation" value=""></textarea></td>
</tr>
<tr>
<td colspan="2" bgcolor="#E6E6E6"><p align="right"><input type="submit" name="submit" value=" S'inscrire "></p></td>
</br></br></br></br></br></tr>
</form>
</table></br></br></br></br></br>
<p><span class="red">*</span> Ces champs doivent obligatoirement être remplis </p>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//en">
<html>
<head>
<title>- test - </title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<table border="0" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<h1 height="29"><td valign="top" border="0" align="center" class="titreP"></td></h1>
</tr>
<table align="center" cellspacing="0">
<form action="index.php?mod=inscription" method="post" enctype="multipart/form-data">
<tr></br></br></br>
<td colspan="2" bgcolor="#E6E6E6"><p align="center"><br><b>Inscrivez vous : </b><br></td>
</tr>
<tr>
<td height="5" bgcolor="#E6E6E6" width="218" align="right">Email : </td>
<td height="5" bgcolor="#E6E6E6" width="249" ><input type="text" size="30" maxlength="255" name="Email" value=""><span class="red">*</span></td>
</tr>
<tr>
<td height="5" bgcolor="#E6E6E6" width="218" align="right">Mot de passe : </td>
<td height="5" bgcolor="#E6E6E6" width="249" ><input type="password" size="30" name="Mot_Passe" value=""><span class="red">*</span></td>
</tr>
<tr>
<td height="5" bgcolor="#E6E6E6" width="218" align="right">Phrase mot de passe : </td>
<td height="5" bgcolor="#E6E6E6" width="249" ><input type="text" size="30" maxlength="255" name="Phrase_Mot_Passe" value=""></td>
</tr>
<tr>
<td height="5" bgcolor="#E6E6E6" width="218" align="right">Nom : </td>
<td height="5" bgcolor="#E6E6E6" width="249" ><input type="text" size="30" maxlength="255" name="Nom" value=""><span class="red">*</span></td>
</tr>
<tr>
<td height="5" bgcolor="#E6E6E6" width="218" align="right">Prénom : </td>
<td height="5" bgcolor="#E6E6E6" width="249" ><input type="text" size="30" maxlength="255" name="Prenom" value=""><span class="red">*</span></td>
</tr>
<tr>
<td height="5" bgcolor="#E6E6E6" width="218" align="right">Société : </td>
<td height="5" bgcolor="#E6E6E6" width="249" ><input type="text" size="30" maxlength="255" name="Societe" value=""><span class="red">*</span></td>
</tr>
<tr>
<td height="5" bgcolor="#E6E6E6" width="218" align="right">Adresse : </td>
<td height="5" bgcolor="#E6E6E6" width="249" ><textarea type="text" size="35" maxlength="255" name="Adresse" value=""></textarea><span class="red">*</span></td>
</tr>
<tr>
<td height="5" bgcolor="#E6E6E6" width="218" align="right">Code Postal : </td>
<td height="5" bgcolor="#E6E6E6" width="249" ><input type="text" size="30" maxlength="255" name="Cp" value=""><span class="red">*</span></td>
</tr>
<tr>
<td height="5" bgcolor="#E6E6E6" width="218" align="right">Ville : </td>
<td height="5" bgcolor="#E6E6E6" width="249" ><input type="text" size="30" maxlength="255" name="Ville" value=""><span class="red">*</span></td>
</tr>
<tr>
<td height="5" bgcolor="#E6E6E6" width="218" align="right">Pays : </td>
<td height="5" bgcolor="#E6E6E6" width="249" ><input type="text" size="30" maxlength="255" name="Pays" value=""><span class="red">*</span></td>
</tr>
<tr>
<td height="5" bgcolor="#E6E6E6" width="218" align="right">Etat : </td>
<td height="5" bgcolor="#E6E6E6" width="249" ><input type="text" size="30" maxlength="255" name="Etat" value=""></td>
</tr>
<tr>
<td height="5" bgcolor="#E6E6E6" width="218" align="right">Téléphone (standard) : </td>
<td height="5" bgcolor="#E6E6E6" width="249" ><input type="text" size="30" maxlength="255" name="Tel_Standard" value=""></td>
</tr>
<tr>
<td height="5" bgcolor="#E6E6E6" width="218" align="right">Téléphone (Direct) : </td>
<td height="5" bgcolor="#E6E6E6" width="249" ><input type="text" size="30" maxlength="255" name="Tel_Direct" value=""><span class="red">*</span></td>
</tr>
<tr>
<td height="5" bgcolor="#E6E6E6" width="218" align="right">Téléphone (portable) : </td>
<td height="5" bgcolor="#E6E6E6" width="249" ><input type="text" size="30" maxlength="255" name="Tel_Portable" value=""></td>
</tr>
<tr>
<td height="5" bgcolor="#E6E6E6" width="218" align="right">Fax (standard) : </td>
<td height="5" bgcolor="#E6E6E6" width="249" ><input type="text" size="30" maxlength="255" name="Fax_Standard" value=""></td>
</tr>
<tr>
<td height="5" bgcolor="#E6E6E6" width="218" align="right">Fax (direct) : </td>
<td height="5" bgcolor="#E6E6E6" width="249" ><input type="text" size="30" maxlength="255" name="Fax_Direct" value=""><span class="red">*</span></td>
</tr>
<tr>
<td height="5" bgcolor="#E6E6E6" width="218" align="right">Service : </td>
<td height="5" bgcolor="#E6E6E6" width="249" ><input type="text" size="30" maxlength="255" name="Service" value=""></td>
</tr>
<tr>
<td height="5" bgcolor="#E6E6E6" width="218" align="right">Batiment : </td>
<td height="5" bgcolor="#E6E6E6" width="249" ><input type="text" size="30" maxlength="255" name="Batiment" value=""></td>
</tr>
<tr>
<td height="5" bgcolor="#E6E6E6" width="218" align="right">Observation : </td>
<td height="5" bgcolor="#E6E6E6" width="280" ><textarea type="text" size="30" maxlength="255" name="Observation" value=""></textarea></td>
</tr>
<tr>
<td colspan="2" bgcolor="#E6E6E6"><p align="right"><input type="submit" name="submit" value=" S'inscrire "></p></td>
</br></br></br></br></br></tr>
</form>
</table></br></br></br></br></br>
<p><span class="red">*</span> Ces champs doivent obligatoirement être remplis </p>
</body>
</html>
jérémy1664
Messages postés
165
Date d'inscription
lundi 4 juin 2007
Statut
Membre
Dernière intervention
3 juillet 2008
4
5 juin 2007 à 11:28
5 juin 2007 à 11:28
je sais bien mais c pas mon souci principal
par hasard, cherche si tu n'aurait pas inclue ta feuille de fonctions ailleurs que ta feuille appelante. celle qui affiche inscrire_erreur ou test 4
jérémy1664
Messages postés
165
Date d'inscription
lundi 4 juin 2007
Statut
Membre
Dernière intervention
3 juillet 2008
4
5 juin 2007 à 14:41
5 juin 2007 à 14:41
j' ai vraiment trop de mal et je m'embrouille dans les fonctions appelée et appelantes
test4 c'est mon formulaire
inscrire_erreur.php c'est un message d'erreur
fonction_valid.php c'est les fonction que tu m'a gentiment envoyé
et enfin test3.php c'est ça :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//en">
<html>
<head>
<title>- test - </title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<?php
include("fonctions/fonction_valid.php");
?>
<body>
<?php
/* affiche le formulaire si les données n'ont pas été envoyé ou déclare les variables du formulaires si il a été rempli*/
if (isset($_POST['test4']))
{
$id = $_POST['id'];
$Email = $_POST['Email'];
$Mot_Passe = $_POST['Mot_Passe'];
$Phrase_Mot_Passe = $_POST['Phrase_Mot_Passe'];
$Nom = $_POST['Nom'];
$Prenom = $_POST['Prenom'];
$Nom_Societe = $_POST['Nom_Societe'];
$Adresse = $_POST['Adresse'];
$Cp = $_POST['Cp'];
$Ville = $_POST['Ville'];
$Pays = $_POST['Pays'];
$Etat = $_POST['Etat'];
$Tel_Standard = $_POST['Tel_Standard'];
$Tel_Direct = $_POST['Tel_Direct'];
$Tel_Portable = $_POST['Tel_Portable'];
$Fax_Standard = $_POST['Fax_Standard'];
$Fax_Direct = $_POST['Fax_Direct'];
$Service = $_POST['Service'];
$Batiment = $_POST['Batiment'];
$Date = $_POST = strftime ("%y-%m-%d");
$Heure = $_POST['Heure'];
$Observation = $_POST['Observation'];
}
else
{
include('test4.php');
exit;
}
/*--------------------------------------------------------------------------------*/
/* va chercher si l'adresse email rentré par l'utilisateur a déja été enregistré*/
mysql_connect("localhost", "jeremy", "CJmncqvc" ) or die ("impossible de se connecter à la base de données");
mysql_select_db("gs_computer");
$req = mysql_query("select Email as mail from clients where Email = '$Email'");
$data = mysql_fetch_assoc($req);
mysql_close();
/*vérifie si le formulaire est correctement rempli */
if((validEmail($Email) != $Email) or ($Mot_Passe == "") or ($Nom == "") or ($Prenom == "") or ($Nom_Societe == "") or($Adresse == "") or ( validCp($Cp) != $Cp) or ($Ville == "") or ($Tel_Direct == "") or ($Fax_Direct == "") or (strlen($Mot_Passe) < "6") or (strlen($Mot_Passe) > "50"))
{
include ('inscrire_erreur.php');
}
/* affiche soit que l'enregistrement a été effectué soit que l'email est déjà enregistrer*/
else if ($data['Email'] == $Email)
{ echo "Cette adresse Email a déjà été enregistré sur gs_Computer";
echo "<br/><br/>";
echo "<a href=\"test3.php\">retour vers l'acceuil du site</a></body>";
}
else
{
mysql_connect("localhost", "jeremy", "CJmncqvc" ) or die ("impossible de se connecter à la base de données");
mysql_select_db("gs_computer");
$req = mysql_query("select Email as mail from clients where Email = '".$Email."'");
$data = mysql_fetch_assoc($req);
mysql_close();
mysql_connect("localhost", "jeremy", "CJmncqvc") or die ("impossible de se connecter à la base de données");
mysql_select_db("gs_computer");
mysql_query("INSERT INTO vente_clients(id, Email, Mot_Passe, Phrase_Mot_Passe, Nom, Prenom, Nom_Societe, Adresse, Cp, Ville, Pays, Etat, Tel_Standard, Tel_Direct, Tel_Portable, Fax_Standard, Fax_Direct, Service, Batiment, Date, Heure, Observation) VALUES('', '".$Email."', '".$Mot_Passe."', '".$Phrase_Mot_Passe."', '".$Nom."', '".$Prenom."', '".$Nom_Societe."', '".$Adresse."', '".$Cp."', '".$Ville."', '".$Pays."', '".$Etat."', '".$Tel_Standard."', '".$Tel_Direct."', '".$Tel_Portable."', '".$Fax_Standard."', '".$Fax_Direct."', '".$Service."', '".$Batiment."', '', '', '".$Observation."')");
mysql_close();
if ($civ == "Mr")
{ $sexe="";}
else
{ $sexe="e";}
echo "<img src=\"images/-------.jpg\" alt=\"logo -------\"><br/><br/>";
echo "Merci de votre inscription à gs_computer";
echo "<br/><br/>";
echo "<body id='inscri'>Vous avez bien été enregistré " . $sexe . " : " . $civ . " " . $nom . " " . $prenom ;
echo "<br/><br/>";
echo "Un email vous a été envoyé ";
echo "<br/><br/>";
echo "<a href=\"index.php\">retour vers l'acceuil du site</a></body>";
/* envoie un email pour dire que c'est bon*/
$msg ='<html><head><title>------- vous souhaite la bienvenue</title></head>';
$msg .='<body text-align="left"><img src="http://www.-------.fr/images/-------.jpg" alt="logo -------" text-align="center" margin-left="50%" width="100px" height="100px"></br></br><i>Bienvenue ' . $civ . ' ' . $nom . ' ' . $prenom . '</i><br/><br/>';
$msg .='<p>Nous vous confirmons votre inscription au site de -------</p>votre compte est activé et il vous suffit simplement de vous connecter avec vos login et</br> mot de passe (ci dessous) pour utiliser votre compte sur le site<br/>';
$msg .='Gardez ce mail dans un coin car il vous sera utile si vous oubliez vos login et mot de passe</br>';
$msg .='<br><u>identifiant</u> :<b>' . $Email . '</b><u><br/>mot de passe</u> :<b> ' . $Mot_Passe .'</b>';
$msg .='<p>Merci</p>';
Email($Email, "Inscription au site -------(Mail à LIRE et à CONSERVER)", $msg, "From: '-------'<-------@wanadoo.fr>\r\nReply-To: <-------@wanadoo.fr>\r\nContent-Type: text/html; charset=\"iso-8859-1\"\r\n");
/**/
}
?>
<?
mysql_close($conn); // Déconnexion de MySQL
?>
Pourquoi quand je saisie n'importe quoi je n'ai pas les messages d'erreur genre"cet Email n'est pas valide et surtout pourquoi ma bdd n'inscrit rien alors que j'y été arrivé dans mon premier script
je suis presque découragé sa fait deux jours que je cherche et j'arrive a rien.
test4 c'est mon formulaire
inscrire_erreur.php c'est un message d'erreur
fonction_valid.php c'est les fonction que tu m'a gentiment envoyé
et enfin test3.php c'est ça :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//en">
<html>
<head>
<title>- test - </title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<?php
include("fonctions/fonction_valid.php");
?>
<body>
<?php
/* affiche le formulaire si les données n'ont pas été envoyé ou déclare les variables du formulaires si il a été rempli*/
if (isset($_POST['test4']))
{
$id = $_POST['id'];
$Email = $_POST['Email'];
$Mot_Passe = $_POST['Mot_Passe'];
$Phrase_Mot_Passe = $_POST['Phrase_Mot_Passe'];
$Nom = $_POST['Nom'];
$Prenom = $_POST['Prenom'];
$Nom_Societe = $_POST['Nom_Societe'];
$Adresse = $_POST['Adresse'];
$Cp = $_POST['Cp'];
$Ville = $_POST['Ville'];
$Pays = $_POST['Pays'];
$Etat = $_POST['Etat'];
$Tel_Standard = $_POST['Tel_Standard'];
$Tel_Direct = $_POST['Tel_Direct'];
$Tel_Portable = $_POST['Tel_Portable'];
$Fax_Standard = $_POST['Fax_Standard'];
$Fax_Direct = $_POST['Fax_Direct'];
$Service = $_POST['Service'];
$Batiment = $_POST['Batiment'];
$Date = $_POST = strftime ("%y-%m-%d");
$Heure = $_POST['Heure'];
$Observation = $_POST['Observation'];
}
else
{
include('test4.php');
exit;
}
/*--------------------------------------------------------------------------------*/
/* va chercher si l'adresse email rentré par l'utilisateur a déja été enregistré*/
mysql_connect("localhost", "jeremy", "CJmncqvc" ) or die ("impossible de se connecter à la base de données");
mysql_select_db("gs_computer");
$req = mysql_query("select Email as mail from clients where Email = '$Email'");
$data = mysql_fetch_assoc($req);
mysql_close();
/*vérifie si le formulaire est correctement rempli */
if((validEmail($Email) != $Email) or ($Mot_Passe == "") or ($Nom == "") or ($Prenom == "") or ($Nom_Societe == "") or($Adresse == "") or ( validCp($Cp) != $Cp) or ($Ville == "") or ($Tel_Direct == "") or ($Fax_Direct == "") or (strlen($Mot_Passe) < "6") or (strlen($Mot_Passe) > "50"))
{
include ('inscrire_erreur.php');
}
/* affiche soit que l'enregistrement a été effectué soit que l'email est déjà enregistrer*/
else if ($data['Email'] == $Email)
{ echo "Cette adresse Email a déjà été enregistré sur gs_Computer";
echo "<br/><br/>";
echo "<a href=\"test3.php\">retour vers l'acceuil du site</a></body>";
}
else
{
mysql_connect("localhost", "jeremy", "CJmncqvc" ) or die ("impossible de se connecter à la base de données");
mysql_select_db("gs_computer");
$req = mysql_query("select Email as mail from clients where Email = '".$Email."'");
$data = mysql_fetch_assoc($req);
mysql_close();
mysql_connect("localhost", "jeremy", "CJmncqvc") or die ("impossible de se connecter à la base de données");
mysql_select_db("gs_computer");
mysql_query("INSERT INTO vente_clients(id, Email, Mot_Passe, Phrase_Mot_Passe, Nom, Prenom, Nom_Societe, Adresse, Cp, Ville, Pays, Etat, Tel_Standard, Tel_Direct, Tel_Portable, Fax_Standard, Fax_Direct, Service, Batiment, Date, Heure, Observation) VALUES('', '".$Email."', '".$Mot_Passe."', '".$Phrase_Mot_Passe."', '".$Nom."', '".$Prenom."', '".$Nom_Societe."', '".$Adresse."', '".$Cp."', '".$Ville."', '".$Pays."', '".$Etat."', '".$Tel_Standard."', '".$Tel_Direct."', '".$Tel_Portable."', '".$Fax_Standard."', '".$Fax_Direct."', '".$Service."', '".$Batiment."', '', '', '".$Observation."')");
mysql_close();
if ($civ == "Mr")
{ $sexe="";}
else
{ $sexe="e";}
echo "<img src=\"images/-------.jpg\" alt=\"logo -------\"><br/><br/>";
echo "Merci de votre inscription à gs_computer";
echo "<br/><br/>";
echo "<body id='inscri'>Vous avez bien été enregistré " . $sexe . " : " . $civ . " " . $nom . " " . $prenom ;
echo "<br/><br/>";
echo "Un email vous a été envoyé ";
echo "<br/><br/>";
echo "<a href=\"index.php\">retour vers l'acceuil du site</a></body>";
/* envoie un email pour dire que c'est bon*/
$msg ='<html><head><title>------- vous souhaite la bienvenue</title></head>';
$msg .='<body text-align="left"><img src="http://www.-------.fr/images/-------.jpg" alt="logo -------" text-align="center" margin-left="50%" width="100px" height="100px"></br></br><i>Bienvenue ' . $civ . ' ' . $nom . ' ' . $prenom . '</i><br/><br/>';
$msg .='<p>Nous vous confirmons votre inscription au site de -------</p>votre compte est activé et il vous suffit simplement de vous connecter avec vos login et</br> mot de passe (ci dessous) pour utiliser votre compte sur le site<br/>';
$msg .='Gardez ce mail dans un coin car il vous sera utile si vous oubliez vos login et mot de passe</br>';
$msg .='<br><u>identifiant</u> :<b>' . $Email . '</b><u><br/>mot de passe</u> :<b> ' . $Mot_Passe .'</b>';
$msg .='<p>Merci</p>';
Email($Email, "Inscription au site -------(Mail à LIRE et à CONSERVER)", $msg, "From: '-------'<-------@wanadoo.fr>\r\nReply-To: <-------@wanadoo.fr>\r\nContent-Type: text/html; charset=\"iso-8859-1\"\r\n");
/**/
}
?>
<?
mysql_close($conn); // Déconnexion de MySQL
?>
Pourquoi quand je saisie n'importe quoi je n'ai pas les messages d'erreur genre"cet Email n'est pas valide et surtout pourquoi ma bdd n'inscrit rien alors que j'y été arrivé dans mon premier script
je suis presque découragé sa fait deux jours que je cherche et j'arrive a rien.