probleme de la base de donnees sous wampserver
bonjour,
je suis en stage de fin d'etude (realisation d'un site dynamique en php4),j'ai creé ma base sous wampserver mais quand je veux connecté a ma base pour verifier si login et password d'admin sont correcte un erreur s'affiche:
Citation:
Warning: mysql_query() [function.mysql-query]: Access denied for user 'SYSTEM'@'localhost' (using password: NO) in C:\wamp\www\dossier_kaoutar\inscription.php on line 9
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\wamp\www\dossier_kaoutar\inscription.php on line 9
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\wamp\www\dossier_kaoutar\inscription.php on line 10
voila le code de la page admin:
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
| <!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" />
<title>site annonce</title>
</head>
<body>
<div>
<form action="inscription.php" method="post">
<p>
<label><strong> Administrateur<br />
<br />
Login :</strong>
<input type="text" name="login" />
</label>
</p>
<p>
<label><strong> Pass : </strong>
<input type="text" name="password" />
</label>
</p>
<p>
<input type="submit" name="valider" value="Valider" />
</p>
<p> </p>
</form>
</div>
</body>
</html>
code de la page inscription.php:
<?php
//session_start();
include("connection.php");
$login=$_POST['login'];
$password=$_POST['password'];
if($_POST['login']=='' or $_POST['password']==''){
echo'<script laguage="\javascript"\> alert("remplir tous les champs");</script>';
include("admin.php");exit;}
$s=mysql_query("select login,password from admin where login='$login' and password='$password'")or die(mysql_error());
$a=mysql_num_rows($s);
if($a==0){
echo'<script laguage="\javascript"\> alert("Veulliez verifier votre Login et Password ");</script>';
include("admin.php");exit;}
if($a==1){
//$_SESSION['login']=$_POST['login'];
//$_SESSION['password']=$_POST['password'];
echo'eee';
include("ajout_user.php");
}
?>
code de la page connection.php:
<?
mysql_connect('localhost','root','');
mysql_select_db('site_annonce');
?> |
n'hesitez pad de m'aider et merci d'avance.