Hi guys, i am basically new to php.. I have recently tried creating a web app using mysql and php.. However, i got a error that states:
Warning: mysqli_select_db() expects exactly 2 parameters, 1 given in C:wampwwwmain.php on line 8
Call Stack
1 0.0000 241960 {main}( ) ..main.php:0
2 0.0010 251336 mysqli_select_db ( ) ..main.php:8
Could not find database (line 8)
whenever i tried to open the page via web browser.. the following are my connection codes:
[code=php]$hostname = “localhost”;
$username = “DBuser1”;
$dbname= “Newdb”;
$password = “newcomer”;
$conn = mysqli_connect($hostname,$username,$password);
mysqli_select_db($conn) or die(“Could not find database”);
May i know how do i fix this problem? It is really getting on my nerves… Please help!!! thank you!!!