$username = mysql_real_escape_string($_POST['username']);
$password = mysql_real_escape_string($_POST['password']);
if(isset($username)){
$queryIsUsername = ("SELECT count(user) FROM users WHERE user = '$username'");
$actionQueryIsUsername = mysql_query($queryIsUsername);
while($rowIsUsername = mysql_fetch_array($actionQueryIsUsername)) {
$isUsername[] = $rowIsUsername['COUNT(user)'];
}
if($isUsername[0]="0"){
header("Location: login.php?error=e1");
}
I have checked the MySQL database, it is online. I have checked the query it does work. I'm not sure whats going on, i've done this a lot. The error is as follows.
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /Applications/XAMPP/xamppfiles/htdocs/craftlist/index.php on line 12