[SOLVED] Multiple user names through PHP
Posted: Sat Mar 19, 2005 7:10 pm
Ok this is just for fun so ignore the insane security risks! Now, I want to be able to have multiple usernames login with one password. This is a php script I called CheckUser.php that is processed on a HTML page through a form.
The OR function works fine, but the problem is, when they login, I have this:
basically and it ALWAYS comes up as the first one...first one being Vince. Id rather use something else besides OR too....any suggestions or what I could do? Thanks!
feyd | Please review how to post code using
Code: Select all
<?php
if (($username = "Vince" OR "JC" OR "Fusioned" OR "Test") &&
($password == "test")) {
header ("Location: mainframe.php?username=$username");
exit;
}
else {
print ("<center>Error logging in. Please try again.<BR></center>\n");
}
?>Code: Select all
Hello $Username! Good to see you again!feyd | Please review how to post code using
Code: Select all
andCode: Select all
tags. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]