im new to php and mysql (using wamp)
im getting the following error when i run my script, any idea what to fix?
Warning: mysqli_select_db() expects parameter 1 to be mysqli, string given in C:\wamp64\www\web1\Register.php on line 79
Warning: mysqli_query() expects parameter 1 to be mysqli, string given in C:\wamp64\www\web1\Register.php on line 81
line 79 t0 83
79 mysqli_select_db($database_localhost, $localhost);
80 $query_Register = "SELECT * FROM mytable";
81 $Register = mysqli_query($query_Register, $localhost) or die(mysql_error());
82 $row_Register = mysql_fetch_assoc($Register);
83 $totalRows_Register = mysql_num_rows($Register);
Here is the database connection:
<?php
# FileName="Connection_php_mysqli.htm"
# Type="mysqli"
# HTTP="true"
$hostname_localhost = "localhost";
$database_localhost = "mydatabase";
$username_localhost = "root";
$password_localhost = "";
$localhost = mysqli_connect($hostname_localhost, $username_localhost, $password_localhost) or trigger_error(mysql_error(),E_USER_ERROR);
?>