here is my php code:-
<?php
$servername="localhost";
$username="root";
$password="";
$db_name="login";
//Create connection
$conn=new mysqli($servername,$username,$password,$db_name);
$db=mysql_select_db($conn,$db_name);
//check connection
if($db)
{
echo"Conneceted successfully";
$username=$_POST['username'];
$password=$_POST['password'];
$fname=$_POST['First_Name'];
$sname=$_POST['Second_Name'];
$query=mysqli_query($conn,"insert into accounts(First_Name,Second_Name,email_id,password) VALUES('".$fname."','".$sname."','".$username."','".$password."')");
}
else{
echo "notdone".mysql_error($conn);
}
?>
and here is my html code:-
<html>
<head>
</head>
<body>
<form action="database\signup.php" method="post">
Email id:<input type="text" name="username"><br>
Password:<input type="text" name="password"><br>
First Name:<input type="text" name="First_Name"><br>
Second Name<input type="text" name="Second_Name"><br>
<input type="submit">
</form>
</body>
</html>
When i am filling the form and submitting I am getting output 'notdone' and these are the two warnings which i am getting:-
Warning: mysql_error() expects parameter 1 to be resource, object given in C:\wamp64\www\mywebsite\database\signup.php on line 27
Warning: mysql_select_db() expects parameter 1 to be string, object given in C:\wamp64\www\mywebsite\database\signup.php on line 10
Please can any one help what wrong i am doing here?