Thread Starter
jswolf
(@jacobshaw)
Is there any way to help me figure out why no session populates in the table in mysql?
Thread Starter
jswolf
(@jacobshaw)
Yes, I did activate it.
This is the login page. attempting to place inputs from a form into the respective sessionn variables
<?php
session_start();
if (isset($_POST["Submit"]) ) {
$user = $_POST["user"];
$pass = $_POST["pass"];
if (authenticate($user, $pass) ) {
$_SESSION['user']=$user;
$_SESSION['pass']=$pass;
echo("<h2>Login Successful</h2>");
}
else
{
loginform();
}
}
else
{
loginform();
}
Then, I go to the following page, I test to see if they are empty and create new variables if they are set
<?php
session_start();
if (isset($_SESSION['user'])) {
$user=$_SESSION['user'];
$pass=$_SESSION['pass'];
}
else
{
echo("<h1>No credentials found</h1>");
exit();
}
-
This reply was modified 5 years, 2 months ago by jswolf.
-
This reply was modified 5 years, 2 months ago by jswolf.
-
This reply was modified 5 years, 2 months ago by jswolf.
-
This reply was modified 5 years, 2 months ago by jswolf.