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"; ?> Quote Link to comment Share on other sites More sharing options...
styx07 Posted August 14, 2013 Share Posted August 14, 2013 (edited) $conn= mysql_connect("localhost","USERNAME","PASSWORD"); $db = mysql_select_db("YOUR_DATABASE_NAME",$conn); Edited August 14, 2013 by styx07 Quote Link to comment Share on other sites More sharing options...
AbraCadaver Posted August 14, 2013 Share Posted August 14, 2013 ERROR Quote Link to comment Share on other sites More sharing options...
PravinS Posted August 14, 2013 Share Posted August 14, 2013 check your MySQL database username and password Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.