I am creating a login system whereby you select a "clan" from a drop down menu and you enter a username and password (MD5 encrypted).
THe table looks like this:
username | Password | clan | user_status |
I need the process script to look like this (it has some english in because I am not fluent in PHP!!!!)
--connection stuff--
$query = "SELECT * from clan_members WHERE username = '$username' AND password = md5('$password')";
--result stuff-- ($foo etc)
$user_status=$foo['user_status'];
$db_clan=$foo['clan']; (etc)
If $user_status = "admin" AND if $clan_name_that_they_selected_in_the_form /*drop down menu */ = $db_clan;
include "The page"
I know I have forgotten the elses.... but I want it to work like a logic gate... both the user_status AND the selected clan MUST match that in the database.
I hope you understand..
Alex.