mysqli_select_db() is passing error
Title
Question
Warning<span style="color: rgb(0, 0, 0); font-family: "Times New Roman"; font-size: medium;">: mysqli_select_db() expects exactly 2 parameters, 1 given in </span>C:\xampp\htdocs\connect.php<span style="color: rgb(0, 0, 0); font-family: "Times New Roman"; font-size: medium;"> on line </span>4
I got this error. How can I remove it?
PHP-and-MySQL MySQL-Part-2 07-08 min 20-30 sec
Answers:
<?php
error_reporting(0);
$connect = mysqli_connect("localhost", "root", "") or die(mysqli_connect_error());
echo "Connected to MySQL <br>";
mysqli_select_db($connect, "spoken_tutorial_db") or die(mysqli_error());
echo "Connected Database !<br>";
The above code works. 2 paramets to function-> mysqli_select_db($connect, "spoken_tutorial_db")
Login to add comment