dear all,
hi,
im currently using a php for interface and WAMP for the server side which uses phpMyAdmin.
this is a e-dentistry that I got from my friend to implement in my laptop.
for some reason, which i dont know what it is, after I imported all database, I've changed the database user and password, etc... when I want to login in the first place, I get this errors:
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: YES) in C:\wamp\www\ITProject\SE2Project\Edentistry\loginp.php on line 13
Could not connect
Warning: mysql_select_db() expects parameter 2 to be resource, boolean given in C:\wamp\www\ITProject\SE2Project\Edentistry\loginp.php on line 16
Warning: mysql_query() [function.mysql-query]: Access denied for user 'SYSTEM'@'localhost' (using password: NO) in C:\wamp\www\ITProject\SE2Project\Edentistry\loginp.php on line 17
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\wamp\www\ITProject\SE2Project\Edentistry\loginp.php on line 17
Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\wamp\www\ITProject\SE2Project\Edentistry\loginp.php on line 18
Warning: mysql_free_result() expects parameter 1 to be resource, boolean given in C:\wamp\www\ITProject\SE2Project\Edentistry\loginp.php on line 19
=============================================================================================
and my login page code are:
$user=$_POST['user'];
$pass=$_POST['pass'];
$link=mysql_connect("127.0.0.1:3306","root","edentistry");
if (!$link)
echo "Could not connect";
mysql_select_db("edentistry",$link);
$result=mysql_query("SELECT * FROM user_pass WHERE user='$user' AND password='$pass'");
$row=mysql_fetch_assoc($result);
mysql_free_result($result);
if ($row['user']!="" && $row['password']!=""){
if($row['user'] == 'secretary')
include 'secretary.php';
else if ($row['user'] == 'dentist')
include 'dentist.php';
}
else
include 'invalid.php';
any idea to solve my problem? it is really urgent as I do not have sufficient time...
thanks