Pb de password html vers php en clair
Bonjour à tous,
Voici mon soucis, j'ai une BD MySQL avec quelques users créés directement avec MySQL Administrator.
D'un côté j'ai mon script html où il y a (entre autres) le code suivant :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| <html>
<head></head>
<body>
<form method="POST" action="choix_graphs.php">
<label><p><b>Veuillez entrer votre identifiant et votre mot de passe :</b></p></label>
Identifiant : <input type="text" name="identifiant" value="" size="15" maxlength="15">
Mot de passe : <input type="password" name="motpasse" value="" size="10" maxlength="10"><br>
...plein de trucs dans un tableau...
<tr><td colspan="6"> <p align="center"> <input align="center" type="submit" name="bouton_val" value="OK" /></p> </td></tr>
</table>
</form>
</body>
</html> |
et de l'autre, j'ai mon script php où il y a :
Code:
1 2 3 4 5 6 7 8 9 10
| $mysqlhost="127.0.0.1";
$mysqluser=addslashes(trim($_POST["identifiant"]));
$mysqlpasswd=addslashes(trim($_POST["motpasse"]));
$mysqldbname="test_xxxx";
$link=mysql_connect($mysqlhost,$mysqluser,$mysqlpasswd);
if ($link==FALSE) {
echo "<p><b>Impossible de se connecter à la base ! Réessayez plus tard...</b></p></body></html>\n";
exit();
} |
Et donc, tous marche très bien, mais même si j'utilise le type "password" dans mon script html qui cache ce que l'on tape, quand je récupère la valeur avec $_POST["identifiant"], à cet endroit (et pendant le transfert html->php) la valeur du mot de passe est en clair, ce qui est plutôt gènant pour un password... :?
Ma question est donc la suivante, comment je peux passer une valeur cryptée de mon html à mon php ???
Merci d'avance !