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

I'm trying to use sessions to store variables in .net6, but the values are not getting stored – Asp.net

I'm trying to use sessions to store variables in .net6, I already configured program.cs but the session still not storing the values, using .net6 core with c#. using Microsoft.EntityFrameworkCore; using nsaprojeto.Data; var builder = WebApplication.CreateBuilder(args); builder.Services.AddDistributedMemoryCache(); builder.Services.AddSession(options => { options.IdleTimeout…

VIEW QUESTION
Back To Top
Search