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'];
- if($logged_user == false) {
- echo "Wrong username or password. Or username or password length wrong";
- }
- }
- else {
- echo "Username and/or password too short.";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement