All pastes #2109786 Raw Edit

Something

public text v1 · immutable
#2109786 ·published 2012-02-04 22:29 UTC
rendered paste body
index.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";
}

?>