I'm making a script that will integrate with phpVMS's login system.
I've got it working, if someone goes to the page logged in it will show. How can I make it so that when someone opens the webpage, not logged in, it sends them to the login page?
Currently, I get the error:
Cannot modify header information - headers already sent by (output started at /home/a4366948/public_html/mindfulhacker/private/man/index.html:11) in /home/a4366948/public_html/mindfulhacker/private/man/index.html on line 16
I saw another post about this same problem, but I was confused on how I could have a stylesheet working at the same time - there is no point having just a unformatted page!
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Language" content="en-gb">
<meta name="language" content="eng">
<meta name="resource-type" content="document">
<link rel="stylesheet" href="style.css" type="text/css">
<title>Management System || CCVG</title>
<?php include('/home/a4366948/public_html/core/codon.config.php'); ?>
</head>
<body>
<div class="container">
<div class="pagetitle">CapitalConnect Virtual Group - Management System</div>
<?php
if(Auth::LoggedIn()) {
?>
<div class="menu"><table class="tb_blue_full margin_10" align="center" border="0" cellpadding="0" cellspacing="0" width="780"><tbody><tr><td class="cell_blue_botright" height="25" width="260"><div align="center"><strong><a href="/home/login_sso.php">Away Status</a></strong></div></td><td class="cell_blue_botright" height="25" width="260"><div align="center"><strong><a href="/home/status.php">Students</a></strong></div></td><td class="cell_blue_bot" height="25" width="260"><div align="center"><strong><a href="/bookings/calendar.php">Classes</a></strong></div></td></tr></tbody></table></div>
<?php
} else {
header("Location: ".url('/login'));
exit;
}
?>
<div style="clear: both;"> </div>
</div>
</body></html>