Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(isset($_POST['username'])) {
- if(strlen($_POST['username']) >= 3 && strlen($_POST['password']) >= 6) {
- $logged_user = $user_api->login($_POST['username'], $_POST['password']);
- echo "<h1>IT WORKED! Welcome back to Clementeene {$_POST['username']}</h1> <a href='index.php'>Go play!</a>";
- echo "<a href='usercp.php'>Go to control panel</a>";
- $_SESSION["logged_in"] = true;
- $_SESSION["username"] = $logged_user['username'];
- $_SESSION["user_id"] = $logged_user['id'];
- else if($logged_user == false) {
- echo "Wrong username or password.";
- }
- }
- else {
- echo "Wrong username or password.";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement