Location: PHPKode > scripts > phpEmailUser > mypage.php
<?php
/*
* phpemailuser by georgfly
* Desc: Displays a welcome page when the user
* successfully logs in or registers.
* Contains links to user account page where users can change their data
*/

session_start();
if(@$_SESSION['auth'] != "yes")
{
	header("Location: login_reg.php");
	exit();
}

if (@$_POST['Button'] == "Log out")
{
	session_destroy();
	header("Location: login_reg.php");
	exit();
}

if (@$_POST['Button'] == "My Account")
{
	header("Location: login_reg_change.php");
	exit();
}


echo "<head><title>my welcome page</title></head>
<body>";
echo "<p style='text-align: center; font-size: 1.5em;
font-weight: bold; margin-top: 1em'>
The User {$_SESSION['logname']}, has
successfully logged in</p>";
?>

<form acton=<?php echo $_SERVER['PHP_SELF'].' '?> method="POST">
<input type="submit" name="Button" value="My Account" style='margin-top: 2em;'>
</form>

<form acton=<?php echo $_SERVER['PHP_SELF'].' '?> method="POST">
<input type="submit" name="Button" value="Log out" style='margin-top: 0.5em;'>
</form>

<a href="login_reg_change.php">My Account</a>

</body></html>
Return current item: phpEmailUser