File manager - Edit - /home/webapp68.cm.in.th/u68319090012/Project/web/check_login.php
Back
<?php include "db.php"; $user = $_POST['username']; $pass = $_POST['password']; $sql = "SELECT * FROM users WHERE username=? AND password=?"; $stmt = $conn->prepare($sql); $stmt->bind_param("ss", $user, $pass); $stmt->execute(); $result = $stmt->get_result(); if ($result->num_rows === 1) { $_SESSION['login'] = true; $_SESSION['username'] = $user; header("Location: index.php"); } else { echo "<script>alert('Login ไม่ถูกต้อง');history.back();</script>"; }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.51 |
proxy
|
phpinfo
|
Settings