On the top of a signup page for a site's members to register I get the following error at the top of the page:
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/k/c/1/kc15admin/html/ptr/signup.php:2) in /home/content/k/c/1/kc15admin/html/ptr/signup.php on line 3
Here is the code used for the signup page:
<link href="css.css" type="text/css" rel=stylesheet>
<?php
session_start();
$string = "user agent: " . $SERVER['HTTP_USER_AGENT'] . " | remote address: " . $SERVER['REMOTE_ADDR'] . " | Date: " . date("m/d/Y H:i:s") . " | http referrer: " . $HTTP_REFERER . "\n";
$ip = isset($SERVER['HTTP_X_FORWARDED_FOR']) ? $SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];
require("conf/connection.php");
include("tpl/header.php");
?>
<?
include("includes/wherelogin_1_bar.php");
include("report.php");
?>
<div align="center">
<table cellspacing="0" cellpadding="2" bgcolor="#FFFFFF" bordercolor="#<? echo $color2;?>" border="1" width="800">
<tr><td vAlign="top" width="175">
<?
include("includes/leftsidebar.php");
?>
</td>
<td vAlign="top"><div align="center">
<table cellspacing="0" cellpadding="0" border="0">
<tr><td>
<div align="center">
<center><font class="bodytext5red2">
<br>Your IP address:
<? echo $ip;?>
<BR></font><font class="bodytext5red">
<? echo $es;?></font>
<link href="css.css" type="text/css" rel=stylesheet><BR>
<table border="0" align="center" width="450" cellpadding="0" cellspacing="0">
<tr><td width="16"><img src="images/top_lef.gif" width="16" height="16"></td>
<td height="16" background="images/top_mid.gif"><img src="images/top_mid.gif" width="16" height="16"></td>
<td width="24"><img src="images/top_rig.gif" width="24" height="16"></td>
</tr><tr>
<td width="16" background="images/cen_lef.gif"><img src="images/cen_lef.gif" width="16" height="11"></td>
<td align="left" valign="middle" bgcolor="#FFFFFF">
<p><center><font class="bodytext5">Must fill in every field there is a ( ) next to it!</center></p>
<p><center>
<noscript>
Javascript is disabled and is required to be a member!</font>
</noscript>
</center>
</p>
<form method="post" name="myform" action="signup_process.php?affid=<? print $affid;?>">
<p>
<label for="username">Username:
<input type="text" size="20" name="username" id="username" class="bodytext5" /></label><br>
<BR>
<label for="password">Password:
<input type="password" size="12" name="password" id="password" class="bodytext5" /></label><br>
<BR>
<label for="firstn">First Name:
<input type="text" size="20" name="firstn" id="firstn" class="bodytext5" /></label><br>
<BR>
<label for="lastn">Last Name:
<input type="text" size="20" name="lastn" id="lastn" class="bodytext5" /></label><br>
<BR>
<label for="address">Address:
<input type="text" size="20" name="address" id="address" class="bodytext5" /></label><br>
<BR>
<label for="city">City:
<input type="text" size="20" name="city" id="city" class="bodytext5" /></label>*<br>
<BR>
<label for="state">State:
(Second half of code is in the post below because it wouldn't accept it all at once.)
Any one that can spot where there might be a problem in the coding, please let me know.
Thanks,
David