Hi, i have a problem with starting a session on this one page. All the other pages work just fine but when i call this page i get this error.
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /blah/getpassword2.php:2) in /blah/getpassword2.php on line 4
and this is the code on the page.
<?php
If ($Submit){
session_start();
//Check Log In Info
$Sql = "SELECT OnlineID,Password FROM tblSignUp WHERE Email Like '$txtEmailAddress'";
$Result = mysql_query($Sql, $Connect);
If (mysql_num_rows($Result) > 0) {
$resultArray=@mysql_fetch_array($Result);
$OnlineID=$resultArray[0];
$Password=$resultArray[1];
$To = $txtEmailAddress;
$Subject = "Your Account Information from blah.com";
$Body = "<b>Your Account Information from blah.Com<br></b>";
$Body .= "<b>Your OnlineID is: </b>".$OnlineID."<br>";
$Body .= "<b>Your Password is: </b>".$Password."";
mail($To,$Subject,$Body,"From: [email]Support@blah.com[/email]\r\nContent-Type: text/html; charset=iso-8859-1\n");
Print "Your Account Information has been sent.";
}
else {
Print "The email address you entered could not be found in our database.";
}
}
?>
I can not figure out why it is saying it cant start the session becasue this page has already started the session... that makes no sense. I use session start on every other page and i dont get this error.
Any ideas? Thanks!