Jump to content

error


dean012

Recommended Posts

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: YES) in E:\xampp\htdocs\signup.php on line 2

Warning: mysql_select_db() expects parameter 2 to be resource, boolean given in E:\xampp\htdocs\signup.php on line 3
FailedNo 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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.