Bladeren bron

i think i got it?

development
mauirixxx 8 jaren geleden
bovenliggende
commit
ab6d805e72
1 gewijzigde bestanden met toevoegingen van 10 en 14 verwijderingen
  1. +10
    -14
      gw-login.php

+ 10
- 14
gw-login.php Bestand weergeven

@@ -12,22 +12,18 @@ $sqllogin = "SELECT * FROM users WHERE users.username = '$username' and password
if ($result = $con->query($sqllogin)){
$row_cnt = mysqli_num_rows($result);
if ($row_cnt > 0){
echo 'you should be logging in now!<BR>'; //will move the while loop up to here if successful
while ($row = $result->fetch_array()){
$uname = $row['username'];
$uid = $row['userid'];
$access = $row['access'];
$_SESSION['username'] = $uname;
$_SESSION['userid'] = $uid;
$_SESSION['access'] = $access;
echo 'Proceed to character selection <A HREF="gw-toon.php">here</A><BR>'; //really should automate this
}
} else {
echo 'That was not a valid username or password!<BR>';
echo 'Please try again <A HREF="gw-index.php">here</A>';
}
while ($row = $result->fetch_array()){
$uname = $row['username'];
$uid = $row['userid'];
$access = $row['access'];
$_SESSION['username'] = $uname;
$_SESSION['userid'] = $uid;
$_SESSION['access'] = $access;
echo 'Your username is ' . $uname . '. Your userid is ' . $uid . '. Your access level is ' . $access . '.<BR />';
}
} else {
echo 'Login failed - please try again <A HREF="gw-index.php">here</A>'; //saving this for later
exit;
}
echo 'Proceed to character selection <A HREF="gw-toon.php">here</A><BR>'; //really should automate this
?>

Laden…
Annuleren
Opslaan