- Code: Select all
if (isset($_SESSION['MM_Username'])){
$ID = $_SESSION['MM_Username'];
$query = "SELECT Email_address FROM individuals WHERE ID='$ID'" or die(mysql_error());
$result = mysql_query($query);
while($row = mysql_fetch_assoc($result)){
$email = $row['Email_address'];
}
if (is_null($email)){
header ("Location: login_activate_warning.php");
exit;
}
}
But when I transfer everything to the server, it does not work and I receive the following error message.
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in ... on line 41.
Line 41 is:
- Code: Select all
while($row = mysql_fetch_assoc($result)){
I am baffled. Any suggestions or explainations as why it works with xampp but not on the server?