Access denied for user 'root'@'localhost' (using password: NO)
Bonjour,
J'ai dernièrement suivi un tutoriel censé apprendre le PHP & MySQL pour les débutant, mais je n'y comprend rien.
J'essaye actuellement de concevoir un formulaire d'inscription.
pour cela j'ai créer 2 pages PHP.
l'une s’appelle inscription.php
et l'autre register.php
dans la premiere page inscription.php j'y ai inséré le code suivant :
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
| <!DOCTYPE HTML>
<html>
<link rel="shortcut icon" type="image/png" href="mafavicon.png" />
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Inscription</title>
<link href="css1.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="container">
<?php include("header.inc.php"); ?>
<?php include("menus.inc.php"); ?>
<div id="corpsinscription">
<p class="titre1">Inscription</p>
<form id="monform" name="form1" method="post" action="register.php">
<p>
<label>Login :
<input type="text" name="login" />
</label>
</p>
<p>
<label>Mot de passe :
<input type="password" name="password" />
</label>
</p>
<p>
<label>répétez votre passe :
<input type="password" name="repeatpassword" />
</label>
</p>
<p>
<label>Votre Email :
<input type="mail" name="email" />
</label>
</p>
<p>
<label>
<input type="submit" name"submit" value="envoyer" />
</label>
</p>
</form>
</div>
<?php include("footer.inc.php");?>
</div>
</body>
</html> |
Puis, dans la deuxième page register.php j'y ai inséré le code suivant :
Code:
1 2 3 4 5 6
| <?php
$connexion=mysql_connect("localhost","root","");
mysql_select_db("membres");
?> |
Mais rien ne marche le m'essage d'erreur suivant affiche :
Citation:
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: NO) in /home/croba286/public_html/register.php on line 3
Warning: mysql_select_db() [function.mysql-select-db]: Access denied for user 'croba286'@'localhost' (using password: NO) in /home/croba286/public_html/register.php on line 4
Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in /home/croba286/public_html/register.php on line 4
J'aurais vraiment besoin d'aide, cela fait maintenant 2 semaine que je bloque sur le même problème en essayant divers solutions, mais toujous les même résultat d'erreur :/.
Merci de m'avoir portée attention.