Hello, i'm stuck with if, else if and else. My script doesn't work (no errors but doesn't work). I think problem is in this part:
//if username not found, insert that
if (!$row){
mysql_query("INSERT INTO `users` (username, password, access, created, expired, days) VALUES('$username', '$password', '$access', '$created', '$expires', '$days')");
echo $reply1;
}
//if user have same "access"
else if ($access == $accessCurrent){
mysql_query("UPDATE `users` (username, password, access, created, expired, days) VALUES('', '', '', '', '$expiresNew', '')");
echo $reply2;
}
//if user haves different "access"
else{
mysql_query("INSERT INTO `users_2` (username, password, access, created, expired, days) VALUES('$username', '$password', '$access', '$created', '$expires', '$days')");
mysql_query("UPDATE `users` (username, password, access, expired, days) VALUES('', '', '$accessNew', '')");
echo $reply3;
}
If you know what's wrong then tell me