I am trying to start a session using this code but I get a error when opening the page.
Can anyone please help?
Thanks
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php echo $firstname ?> from <?php echo $companyname?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
<!--
body,td,th {
font-family: Geneva, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #333333;
}
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.style6 {
font-size: 24px;
color: #999999;
}
.style7 {font-size: 24px}
.style9 {
color: #333333;
font-size: 12px;
}
-->
</style></head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th width="2%" rowspan="9" scope="col"> </th>
<th height="29" colspan="3" scope="col"><div align="left" class="style7"></div>
<div align="left" class="style6"> <?php echo $companyname ?></div></th>
<th width="17%" rowspan="9" scope="col"> </th>
</tr>
<tr>
<td height="27" colspan="2"><div align="right"><span class="style7"><span class="style7"></span></span></div> <div align="left"><span class="style7"><span class="style7"> <?php echo $jobtitle ?></span></span></div></td>
<td width="43%" class="style9"><div align="left"><span class="style7"><span class="style9"><?php echo $firstname ?>, you are currently logged in as
<?php echo $username ?></span></span></div></td>
</tr>
<tr>
<td colspan="2"><div align="left"> </div></td>
<td class="style9"><div align="left">Your login time and date is <?php
echo date("l dS of F Y h:i:s A");
?>
</div></td>
</tr>
<tr>
<td colspan="2"><div align="left"> Welcome <?php echo $firstname ?>
<?php echo $lastname?>.</div></td>
<td><div align="left">This information will be logged into the system for security purposes. </div></td>
</tr>
<tr>
<td colspan="2"><div align="left"> What would you like to do during this session? </div></td>
<td><div align="left"></div></td>
</tr>
<tr>
<td height="15" colspan="2" valign="top"><div align="left">
</div> <div align="left"></div> <div align="left"></div></td>
<td><div align="left"></div> <div align="left"></div> <div align="left"></div></td>
</tr>
<tr>
<td width="7%" height="42" valign="middle">
<span class="style9"><a href="http://www.vrconsult.co.uk"><img src="icons/home.jpg" width="28" height="28" border="0" /></a></span> <div align="left"></div></td>
<td width="31%" valign="middle"><span class="style9">Back to Website </span></td>
<td><div align="left"><?php session_start(); ?>
</div></td>
</tr>
<tr>
<td height="40" valign="middle">
<a href="add_report.php?username=<?php echo $username?>&ulevel=<?php echo $ulevel?> "><img src="icons/add.jpg" width="28" height="28" border="0" /></a> <div align="left"></div></td>
<td>Add a new report </td>
<td><div align="left"></div></td>
</tr>
<tr>
<td><div align="left"> <img src="icons/letter.jpg" width="28" height="28" /></div></td>
<td>View a report </td>
<td><div align="left"></div></td>
</tr>
<tr>
<th scope="col"> </th>
<td> </td>
<td> </td>
<td> </td>
<th scope="col"> </th>
</tr>
<tr>
<th scope="col"> </th>
<td> </td>
<td> </td>
<td> </td>
<th scope="col"> </th>
</tr>
<tr>
<th scope="col"> </th>
<td> </td>
<td> </td>
<td> </td>
<th scope="col"> </th>
</tr>
<tr>
<th scope="col"> </th>
<td> </td>
<td> </td>
<td> </td>
<th scope="col"> </th>
</tr>
</table>
</body>
</html>Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\Xeneo\vr\admin\index.php:19) in C:\Xeneo\vr\admin\admincontent.php on line 69
And
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\Xeneo\vr\admin\index.php:19) in C:\Xeneo\vr\admin\admincontent.php on line 69