Précédent   Forum des professionnels en informatique > PHP > Langage > Formulaires
Formulaires Forum d'entraide sur les formulaires avec PHP. Avant de poster -> FAQ formulaires, Cours de formulaires et Sources de formulaires
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 25/09/2007, 18h02   #1
Invité régulier
 
Inscription : février 2007
Messages : 45
Détails du profil
Informations forums :
Inscription : février 2007
Messages : 45
Points : 8
Points : 8
Par défaut Champ de type "mot de passe"

j'ai un formulaire de login et un formulaire d'inscription, dans les 2 j'ai inserer un champ password, le probleme c'est qu'au lancement de ces pages le champs password comprends deja 2 etoiles, j'arrive pas a les enlever
j'ai deja recommencer ca donne toujours le meme resultat
help
alex68 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 25/09/2007, 18h05   #2
Membre Expert
 
Inscription : janvier 2005
Messages : 2 288
Détails du profil
Informations forums :
Inscription : janvier 2005
Messages : 2 288
Points : 2 287
Points : 2 287
on peut voir le code de ton formulaire?
koopajah est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 25/09/2007, 18h43   #3
Invité régulier
 
Inscription : février 2007
Messages : 45
Détails du profil
Informations forums :
Inscription : février 2007
Messages : 45
Points : 8
Points : 8
Voila juste le formulaire
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<form name="form1" method="POST" action="<?php echo $loginFormAction; ?>" class="css" onsubmit="return formCheck(this);">
            <table width="400" border="1" cellspacing="0" bordercolor="#FF0000">
              <tr>
                <td>
<div align="center">
                    <table width="400" border="0" cellspacing="0">
                      <tr> 
                        <td colspan="2" class="bodyText"><div align="center"><font size="3" face="Verdana, Arial, Helvetica, sans-serif">Saisissez 
                            les param&egrave;tres de votre compte </font></div></td>
                      </tr>
                      <tr> 
                        <td width="202" class="bodyText"> <div align="right"><font size="3" face="Verdana, Arial, Helvetica, sans-serif">votre 
                            Login: </font></div></td>
                        <td width="194" class="bodyText"> <input name="login" type="text" id="login"></td>
                      </tr>
                      <tr> 
                        <td class="bodyText"><div align="right"><font size="3" face="Verdana, Arial, Helvetica, sans-serif">votre 
                            mot de passe:</font></div></td>
                        <td class="bodyText"><label>
                          <input name="password" type="password" id="password">
                        </label></td>
                      </tr>
                      <tr> 
                        <td class="bodyText"><div align="right"> 
                          </div></td>
                        <td class="bodyText"> <input name="submit" type="submit" id="submit" value="VALIDER"></td>
                      </tr>
                      <tr> 
                        <td colspan="2" class="bodyText"><div align="center"><font size="3" face="Verdana, Arial, Helvetica, sans-serif">Pour 
                            cr&eacute;er un compte cliquez <a href="inscription.php">ICI </a></font></div></td>
                      </tr>
                    </table>
                  </div></td>
              </tr>
            </table>
          </form>
alex68 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 25/09/2007, 19h21   #4
Rédacteur/Modérateur
 
Avatar de N1bus
 
Inscription : janvier 2003
Messages : 2 018
Détails du profil
Informations personnelles :
Âge : 47
Localisation : France, Charente Maritime (Poitou Charente)

Informations forums :
Inscription : janvier 2003
Messages : 2 018
Points : 1 992
Points : 1 992
Bonjour, tu peux rajouter l'attribut value="" dans ton input.
N1bus est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 25/09/2007, 19h40   #5
Invité régulier
 
Inscription : février 2007
Messages : 45
Détails du profil
Informations forums :
Inscription : février 2007
Messages : 45
Points : 8
Points : 8
c'est fait et cela ne change rien
dommage
alex68 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 25/09/2007, 20h44   #6
Rédacteur/Modérateur
 
Avatar de N1bus
 
Inscription : janvier 2003
Messages : 2 018
Détails du profil
Informations personnelles :
Âge : 47
Localisation : France, Charente Maritime (Poitou Charente)

Informations forums :
Inscription : janvier 2003
Messages : 2 018
Points : 1 992
Points : 1 992
Tu as autre chose dans ta page plus haut ? Tu peux le mettre ici ?
N1bus est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 26/09/2007, 09h17   #7
Invité régulier
 
Inscription : février 2007
Messages : 45
Détails du profil
Informations forums :
Inscription : février 2007
Messages : 45
Points : 8
Points : 8
voici toute la page
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
 
<?php require_once('Connections/connection.php'); ?><?php
// *** login
session_start();
 
$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($accesscheck)) {
  $GLOBALS['PrevUrl'] = $accesscheck;
  session_register('PrevUrl');
}
 
if (isset($_POST['login'])) {
  $loginUsername=$_POST['login'];
  $password=$_POST['password'];
 
 
 
  $MM_fldUserAuthorization = "statut";
  $MM_redirectLoginSuccess = "commande.php";
  $MM_redirectLoginFailed = "login_erreur.php";
  $MM_redirecttoReferrer = false;
  mysql_select_db($database_connection, $connection);
 
  //$LoginRS__query=sprintf("SELECT login, password, statut FROM membre WHERE login='%s' AND password='%s'",
  $LoginRS__query=sprintf("SELECT login, password, statut, personne.id_personne FROM membre, possede_statut, personne WHERE login='%s' AND password='%s' and membre.id_personne=personne.id_personne and personne.id_personne=possede_statut.id_personne and possede_statut.statut='membre'",
  get_magic_quotes_gpc() ? $loginUsername : addslashes($loginUsername), get_magic_quotes_gpc() ? $password : addslashes($password)); 
 
  $LoginRS = mysql_query($LoginRS__query, $connection) or die(mysql_error());
  $loginFoundUser = mysql_num_rows($LoginRS);
  if ($loginFoundUser) {
 
    $loginStrGroup  = mysql_result($LoginRS,0,'statut');
 
 
    //declare two session variables and assign them
    $GLOBALS['MM_Username'] = $loginUsername;
    $GLOBALS['MM_UserGroup'] = $loginStrGroup;	      
 
    //register the session variables
    session_register("MM_Username");
    session_register("MM_UserGroup");
 
	//Code à ajouter pour PHP 4.2 et +
	$_SESSION['MM_Username']=$loginUsername;
	$_SESSION['MM_UserGroup']=$loginStrGroup;
 
    if (isset($_SESSION['PrevUrl']) && false) {
      $MM_redirectLoginSuccess = $_SESSION['PrevUrl'];	
    }
   header("Location: " . $MM_redirectLoginSuccess );
  }
  else {
    header("Location: ". $MM_redirectLoginFailed );
  }
}
?>
<?
if(isset($_REQUEST["action_"])) {
		switch($_REQUEST["action_"]) {
 
			case "delog":
 
 
			// Destruction de la session
			 unset($_SESSION["login"]);
             session_destroy();
                        break;              
             }//fin du switch     
 
} // isset
 
?>
 
 <html>
<head>
<title>Boutique </title>
 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="css/style.css" type="text/css" />
 
<style type="text/css">
<!--
.Style2 {font-family: "Times New Roman", Times, serif}
-->
</style>
 </style><script type="text/javascript" language="Javascript" src="javascript/verificationlogin.js">
 
<!--
function verificationlogin()
{
}
//-->
</script>
 
</head>
<body>
<div id="Layertitre"> </div>
		<img src="image/log.jpg" width="1470" height="170"/>
 
 
	<div id="Menu">
 
	  <table width="160" border="1" align="center" cellpadding="0" cellspacing="1" bordercolor="#FFFFCC">
				<tr>
				  <td width="160" height="50"><div align="center"><a href="index.html">ACCUEIL</a></td>
				</tr>
				<tr>
				  <td width="160" height="50"><div align="center"><a href="soins.html">SOINS/TARIFS</a></td>
				</tr>
				<tr>
				  <td width="160" height="50" ><div align="center"><a href="produits.php">PRODUITS</a></td>
				</tr>
				<tr>
				  <td width="160" height="50"><div align="center"><a href="contact.php">CONTACT</a></td>
				</tr>
				<tr>
				  <td width="160" height="50"><div align="center"><a href="plan.html">PLAN D'ACCES</a></td>
				</tr> <p>
 
			<p>&nbsp;</p>
		  <p>&nbsp;</p>
	  </table>   
	</div>
 
	<div id="Layerhaut"> 
		<a href="panier.php">Votre Panier</a>&nbsp;&nbsp;&nbsp;<a href="login.php">S'identifier</a>&nbsp;&nbsp;&nbsp;<a href="inscription.php">S'Inscrire</a>&nbsp;&nbsp;&nbsp;<a href="commande.php">Vos Commandes</a>&nbsp;&nbsp;&nbsp;<A href="login.php?action_=delog">Deconnexion</A></div>
 
 
	<div id="Layercontenu">
	<table width="100%" border="0" cellspacing="0">
  <tr> 
    <td><p align="center" class="bodyText">&nbsp;</p>
      <p align="center" class="bodyText Style2"><strong><font size="6">LOGIN</font></strong></p>
      <table width="100%" border="0">
    <tr> 
      <td height="140"><div align="center">
          <p>
          <form name="form1" method="POST" action="<?php echo $loginFormAction; ?>" class="css" onsubmit="return formCheck(this);">
            <table width="400" border="1" cellspacing="0" bordercolor="#FF0000">
              <tr>
                <td>
<div align="center">
                    <table width="400" border="0" cellspacing="0">
                      <tr> 
                        <td colspan="2" class="bodyText"><div align="center"><font size="3" face="Verdana, Arial, Helvetica, sans-serif">Saisissez 
                            les param&egrave;tres de votre compte </font></div></td>
                      </tr>
                      <tr> 
                        <td width="202" class="bodyText"> <div align="right"><font size="3" face="Verdana, Arial, Helvetica, sans-serif">votre 
                            Login: </font></div></td>
                        <td width="194" class="bodyText"> <input name="login" type="text" id="login"></td>
                      </tr>
                      <tr> 
                        <td class="bodyText"><div align="right"><font size="3" face="Verdana, Arial, Helvetica, sans-serif">votre 
                            mot de passe:</font></div></td>
                        <td class="bodyText"><label>
                          <input name="password" type="password" id="password" value=" ">
                        </label></td>
                      </tr>
                      <tr> 
                        <td class="bodyText"><div align="right"> 
                          </div></td>
                        <td class="bodyText"> <input name="submit" type="submit" id="submit" value="VALIDER"></td>
                      </tr>
                      <tr> 
                        <td colspan="2" class="bodyText"><div align="center"><font size="3" face="Verdana, Arial, Helvetica, sans-serif">Pour 
                            cr&eacute;er un compte cliquez <a href="inscription.php">ICI </a></font></div></td>
                      </tr>
                    </table>
                  </div></td>
              </tr>
            </table>
          </form>
          <p></p>
</div></td>
    </tr>
  </table>  </td>
  </tr>
</table>
 
</div>
 
 
</body>
</html>
alex68 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 26/09/2007, 10h02   #8
Membre habitué
 
Inscription : juin 2006
Messages : 133
Détails du profil
Informations forums :
Inscription : juin 2006
Messages : 133
Points : 125
Points : 125
Bonjour,

C'est normal, vous avez mit un espace dans votre value :

Code :
<input name="password" type="password" id="password" value=" ">
Mettez plutôt ceci à la place :

Code :
<input name="password" type="password" id="password" value="">
Andalor est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 26/09/2007, 10h04   #9
Rédacteur/Modérateur
 
Avatar de N1bus
 
Inscription : janvier 2003
Messages : 2 018
Détails du profil
Informations personnelles :
Âge : 47
Localisation : France, Charente Maritime (Poitou Charente)

Informations forums :
Inscription : janvier 2003
Messages : 2 018
Points : 1 992
Points : 1 992
Là tu as un caratère dans ton champ (espace)
Code :
type="password" id="password" value=" ">
essaye sans espace
Code :
type="password" id="password" value="">
Sinon , peut être ta fonction verificationlogin.js qui n'est pas au point

[edit] Ach ! grilled .....
N1bus est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 26/09/2007, 13h35   #10
Invité régulier
 
Inscription : février 2007
Messages : 45
Détails du profil
Informations forums :
Inscription : février 2007
Messages : 45
Points : 8
Points : 8
j'avis déja testé les 2, c'est toujours pas ça,
alex68 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 26/09/2007, 13h43   #11
Membre du Club
 
Inscription : octobre 2004
Messages : 42
Détails du profil
Informations personnelles :
Âge : 29
Localisation : France, Rhône (Rhône Alpes)

Informations forums :
Inscription : octobre 2004
Messages : 42
Points : 40
Points : 40
Envoyer un message via MSN à MicroAlexx
Bonjour,

Ouvre la page, affiche la source et regarde dans le code si tu as une valeur dans l'attribut value.

Si il n'y a rien, le pb viens surment de ton JS.
je pense tout particulièrement à une erreur de syntaxe sur un test du genre :

Code :
if (password.value == "") {} ou if (password.value != "") {}
ou tu aurai écris

Code :
if (password.value = "") {}
et paf, +2 étoiles.


Cordialement,

Edit: apres relecture enfait non meme comme ca, ca ne devrai pas faire d'étoile :/ bizare

Re Edit : je viens de faire une série de test, sur la syntaxe d'un <input> et a part une erreur dans le js, je ne vois aucun cas ou je me retrouve avec une valeur dans le champ (hormis un value=" ")
MicroAlexx est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 26/09/2007, 14h27   #12
Invité régulier
 
Inscription : février 2007
Messages : 45
Détails du profil
Informations forums :
Inscription : février 2007
Messages : 45
Points : 8
Points : 8
je vois pas, meme si j'enleve mon jS ca laisse les 2 *
quelle galére?
alex68 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 26/09/2007, 14h32   #13
Rédacteur/Modérateur
 
Avatar de N1bus
 
Inscription : janvier 2003
Messages : 2 018
Détails du profil
Informations personnelles :
Âge : 47
Localisation : France, Charente Maritime (Poitou Charente)

Informations forums :
Inscription : janvier 2003
Messages : 2 018
Points : 1 992
Points : 1 992
Si ta page est en ligne, peux tu mettre le lien ici ?
N1bus est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 26/09/2007, 15h02   #14
Membre habitué
 
Inscription : juin 2006
Messages : 133
Détails du profil
Informations forums :
Inscription : juin 2006
Messages : 133
Points : 125
Points : 125
Et si votre page n'est pas sur internet, pouvez vous passer votre box en type='text' pour savoir à quels caractères correspondraient les deux * affichées. Cela pourrait ainsi vous permettre de lancer une recherche sur les deux caractères dans votre code et trouver d'où provient le problème... Enfin en admettant que ce ne sont pas deux espaces.
Andalor est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 26/09/2007, 15h38   #15
Invité régulier
 
Inscription : février 2007
Messages : 45
Détails du profil
Informations forums :
Inscription : février 2007
Messages : 45
Points : 8
Points : 8
non pas encore en ligne ,
et j'ai deja fait une recherche, uand je regarde dans ma Bd c'est 'az'
mais dans le code je trouve nulle part
alex68 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 26/09/2007, 15h46   #16
Rédacteur/Modérateur
 
Avatar de N1bus
 
Inscription : janvier 2003
Messages : 2 018
Détails du profil
Informations personnelles :
Âge : 47
Localisation : France, Charente Maritime (Poitou Charente)

Informations forums :
Inscription : janvier 2003
Messages : 2 018
Points : 1 992
Points : 1 992
Passe le en type="text", tu verras bien ce qu'il affiche .

Autre chose, tu dis que tu as "az" dans la BDD mais comment peut il s'afficher dans le champ si tu as value="" ???


Autre chose : dans ta feuille de style, tu n'aurais pas ces deux lettres en vrac quelque part ?

Code :
1
2
3
4
5
6
7
8
9
 
#password {
font-family: Verdana, Arial, Helvetica, sans-serif; az
font-size: 9px;
font-style: normal;
line-height: normal;
font-weight: normal;
color: #333333;
}
je cherche, hein ...
N1bus est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 05h39.


 
 
 
 
Partenaires

Hébergement Web