Here is my code:

<title>Hanuman Database</title>
<div align="center">
<table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="10"><img src="../images/bg_up_exp_left.GIF" width="20" height="20" /></td>
<td width="722" background="../images/bg_up_experience.gif">&nbsp;</td>
<td width="10"><img src="../images/bg_up_exp_right.gif" width="20" height="20" /></td>
</tr>
<tr>
<td background="../images/left_bg.gif">&nbsp;</td>
<td><table width="758" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="../images/logo_1.jpg" width="96" height="122" /></td>
</tr>
<tr>
<td><?php
session_start();
echo "Global User: ".$_SESSION; ?></td>
</tr>
<tr>
<td><a href="create_user.html"><img src="images/create_user.gif" border="0" /></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="view_users.php" ><img src="images/users.gif" width="64" height="24" border=0/></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="add_control.html"><img src="images/addcontrol.gif" border="0" /></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="view_controls.php"><img src="images/viewcontrol.gif" width="90" height="24" border="0" /></a></td>
</tr>
</table></td>
<td background="../images/right_bg.gif">&nbsp;</td>
</tr>
<tr>
<td><img src="../images/coner_down_left.gif" width="20" height="20" /></td>
<td background="../images/down_bg.gif">&nbsp;</td>
<td><img src="../images/coner_down_right.gif" width="20" height="20" /></td>
</tr>
</table>
</div>
<div align="center"></div>

It show error as below when i view page.

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/hanum3/public_html/tours/main.php:9) in /home/hanum3/public_html/tours/main.php on line 17


Please help me!
Thanks

Recommended Answers

All 2 Replies

session_start() and other headers must be sent before any browser output. So try the following:

<?php
session_start();
?><title>Hanuman Database</title>
<div align="center">
<table width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="10"><img src="../images/bg_up_exp_left.GIF" width="20" height="20" /></td>
<td width="722" background="../images/bg_up_experience.gif">&nbsp;</td>
<td width="10"><img src="../images/bg_up_exp_right.gif" width="20" height="20" /></td>
</tr>
<tr>
<td background="../images/left_bg.gif">&nbsp;</td>
<td><table width="758" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="../images/logo_1.jpg" width="96" height="122" /></td>
</tr>
<tr>
<td><?php 
echo "Global User: ".$_SESSION['gbluser']; ?></td>
</tr>
<tr>
<td><a href="create_user.html"><img src="images/create_user.gif" border="0" /></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="view_users.php" ><img src="images/users.gif" width="64" height="24" border=0/></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="add_control.html"><img src="images/addcontrol.gif" border="0" /></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="view_controls.php"><img src="images/viewcontrol.gif" width="90" height="24" border="0" /></a></td>
</tr>
</table></td>
<td background="../images/right_bg.gif">&nbsp;</td>
</tr>
<tr>
<td><img src="../images/coner_down_left.gif" width="20" height="20" /></td>
<td background="../images/down_bg.gif">&nbsp;</td>
<td><img src="../images/coner_down_right.gif" width="20" height="20" /></td>
</tr>
</table>
</div>
<div align="center"></div>

Many thanks.
It's done.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.