Estoy copiando un código de login que encontre pero al parecer no esta actualizado a la version de PHP 7, en este proceso me marca este error
Fatal error: Uncaught ArgumentCountError: mysqli_select_db() expects exactly 2 arguments, 1 given in E:\xampp\htdocs\login\index.php:9 Stack trace: #0 E:\xampp\htdocs\login\index.php(9): mysqli_select_db('tcs_login') #1 {main} thrown in E:\xampp\htdocs\login\index.php on line 9
Como debo formular la linea de codigo para que sea reconocible, adjunto codigo:
<?php
$host="localhost";
$user="root";
$password="";
$db="tcs_login";
mysqli_connect($host,$user,$password);
mysqli_select_db($db);
if(isset($_POST['username'])){
$uname=$_POST['username'];
$password=$_POST['password'];
$sql="select * from tcs_login where email='".$uname."'AND password='".$password."' limit 1";
$result=mysql_query($sql);
if(mysql_num_rows($result)==1){
echo " You Have Successfully Logged in";
exit();
}
else{
echo " You Have Entered Incorrect Password";
exit();
}
}
?>
<!DOCTYPE html>
<html>
<head>
<title> Login Form in HTML5 and CSS3</title>
<link rel="stylesheet" a href="./style.css">
<link rel="stylesheet" a href="css\font-awesome.min.css">
</head>
<body>
<div class="container">
<img src="image/login.png"/>
<form>
<div class="form-input">
<input type="text" name="text" placeholder="Enter the User Name"/>
</div>
<div class="form-input">
<input type="password" name="password" placeholder="password"/>
</div>
<input type="submit" type="submit" value="LOGIN" class="btn-login"/>
</form>
</div>
</body>
</html>
mysqli_select_db(mysqli $link, string $dbname): bool