alright, so i have a login for something i'm working on, and I dont' want users to have the same Usernames.
Now i'm thinking of just using a selection query to get my login info from the database, so that is what i naturally did... here's my code
//run selection query to pull usernames from database
$select = "SELECT * FROM users ";
$selectql = mysql_query($select);
//use mysql_fetch_array to grab the data as an array
while($row = mysql_fetch_array($selectql)) {
//set $login2 equal to usernames in database
$login2 = $row["1"];
//close while statement
}
//compare $login to our database username ($login2)
if($login == $login2) {
//if they match, echo error
echo "<tr><td class=\"2nd\">Your username, <b>$login</b> is already in use be another member, please go back</td></tr>";
} else {
//continue with query
now that does work... however it only pulls the last user for comparison, not all of them as I would ahve figured it would 🙁
thanks!