i need help. I have a query:
include_once("php_includes/db_conx.php");
......
$m = $_GET['m'];
$sql = "SELECT CID,name from course WHERE major='$m'";
$query = mysqli_query($db_conx,$sql);
if(mysqli_num_rows($query)!=0){..... etc
where $m is a valid variable, and db_conx.php is code for connecting to database. But my $query is returning false, i checked my query seperately in my php my admin, so it is valid. I suspect that it is due to that somehow i am not able to connec to the database. However this works in localhost, and don't on a real server.
Thanks in advance.