Mysqli No database selected Error
问题 <?php $dbcon=mysqli_connect("localhost","root","","simple_login"); mysqli_select_db($dbcon,""); ?> The above code is in db_conection.php In another file i try to accesss a table known as school if(!$_SESSION['username']) { header("Location: index.php");//redirect to login page to secure the welcome page without login access. } else { $user=$_SESSION['username']; require('db_conection.php'); $ex0=mysql_query("SELECT * FROM school WHERE uid='$user'") or die(mysql_error()); $count=mysql_num_rows