skip to Main Content

Php – Login session not accessible other than redirected page

This is my login.php if ($_SERVER["REQUEST_METHOD"] == "POST") { $username = $_POST['username']; $password = $_POST['password']; $stmt = $conn->prepare("SELECT * FROM admin WHERE username=? AND password=?"); $stmt->bind_param("ss", $username, $password); $stmt->execute(); $result = $stmt->get_result(); if ($result->num_rows > 0) { $_SESSION['username'] = $username;…

VIEW QUESTION

In a php session

} put returns between paragraphs for linebreak add 2 spaces at end italic or bold indent code by 4 spaces backtick escapes like _so_ quote by placing > at start of line to make links (use https whenever possible)

VIEW QUESTION
Back To Top
Search