Something
public text v1 · immutableindex.php:
if(mysql_num_rows($result))
{
session_start();
$_SESSION['username'] = htmlspecialchars($username); // htmlspecialchars() sanitises XSS
//header('location: dash.php');
echo $_SESSION['username'];
} else {
$error = "Invalid Username or Password";
}
dash.php:
<?php
if (!isset($_SESSION['username'])) {
{
echo "you're not logged in bro";
} else {
echo "wewp you're logged in";
}
?>