dean012 Posted August 14, 2013 Share Posted August 14, 2013 Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: YES) in E:\xampp\htdocs\signup.php on line 2Warning: mysql_select_db() expects parameter 2 to be resource, boolean given in E:\xampp\htdocs\signup.php on line 3FailedNo database selected <?php $conn= mysql_connect("localhost","root","login"); $db = mysql_select_db("login",$conn); ?> <?php $user =$_POST['n']; $pass =$_POST['p']; $id =$_POST['id']; $sql = "INSERT into phplogin values (".$id.",'".$user."','".$pass."')"; $qury = mysql_query($sql); #INSERT into phplogin values ( #1, #'satish', #'satish'); if(!$qury) echo "Failed". mysql_error(); else echo "successful"; ?> Link to comment https://forums.phpfreaks.com/topic/281144-error/ Share on other sites More sharing options...
styx07 Posted August 14, 2013 Share Posted August 14, 2013 $conn= mysql_connect("localhost","USERNAME","PASSWORD"); $db = mysql_select_db("YOUR_DATABASE_NAME",$conn); Link to comment https://forums.phpfreaks.com/topic/281144-error/#findComment-1444918 Share on other sites More sharing options...
AbraCadaver Posted August 14, 2013 Share Posted August 14, 2013 ERROR Link to comment https://forums.phpfreaks.com/topic/281144-error/#findComment-1444922 Share on other sites More sharing options...
PravinS Posted August 14, 2013 Share Posted August 14, 2013 check your MySQL database username and password Link to comment https://forums.phpfreaks.com/topic/281144-error/#findComment-1444940 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.