Jump to content


Photo

Help with an error PLEASE


  • Please log in to reply
2 replies to this topic

#1 briguy9872

briguy9872
  • Members
  • PipPip
  • Member
  • 11 posts

Posted 03 April 2006 - 01:05 AM

sry to bother, but i need help again!!!
<style type="text/css">
body
{background:}</style>
<style>
body,td,font,div,p{font-family:tahoma;
font-size:10pt;
color: #336699;
line-height:8pt}
b{font-family:tahoma;
font-size:10pt;
color: #0066FF;
font-weight:bold}
a:link, a:active,a:visited
{font-family:tahoma;
font-size:10pt;
color: #0066FF;
text-decoration:none}
a:hover
{font-family:tahoma;
font-size:10pt;
color: #0066CC;
text-decoration:none}
input,textarea
{font-family:tahoma;
font-size:10pt;
color: #0066CC;
background-color: 0099FF;
border: solid 1px}
body{scrollbar-face-color:#0066CC; scrollbar-shadow-color:#006699; 

scrollbar-highlight-color:#009900; scrollbar-3dlight-color:white; 

scrollbar-darkshadow-color:black; scrollbar-track-color: #0066CC; 

scrollbar-arrow-color: BLACK}
</style><center>
UNDER CONSTRUCTION!!! PLEASE PLEASE PLEASE WAIT!!!!!
But for now.......<br><br>
<?php
include 'dbconnect.php';
session_start();
?>
<?
if (isset($_SESSION['user'])) 
  {
    $user = $_SESSION['user'];
    $getuser = "SELECT * from register where userid='$user'";
    $getuser2 = mysql_query($getuser) or die("Could not get user info");
    $getuser3 = mysql_fetch_array($getuser2);

print "<BR>Welcome, $_SESSION[user], you may now access <a 

href='http://www.tbanskorner.com/mail'>mail! Click<a 

href=http://www.tbanskorner.com/logout.php> Here</a>To Logout.";
  

}
else
{
print 'You are not logged in. Please <a 

href="http://www.tbanskorner.com/login.php">Log in</a>';

print ' Or <a href="http://www.tbanskorner.com/mail/register.php">Register</a>';

}

?> 
<P><a href="http://www.tbanskorner.com/mail/login.php">Click here to 

Login</a>
<br><a href="http://www.tbanskorner.com/mail/register.php">Not a member? 

Click here to register for FREE</a>
<br><a href="http://tbanskorner.com/mail/">Click here to access mail.</a><br>
If you would like FREE mail to send to others on the site, click <a 

href="http://www.tbanskorner.com/mail/register.php"><b>here</b></a>
i get back the error:
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/content/t/b/a/tbanskorner/html/index2.php:1) in /home/content/t/b/a/tbanskorner/html/index2.php on line 35



Thanks in advance

ahhhh yes. i forgot to mention that it worked, however, the error came out. it said what i wanted it to say, but the error cam with it. I tried removing the session_start(); tag but it was fruitless.

#2 ToonMariner

ToonMariner
  • Members
  • PipPipPip
  • Advanced Member
  • 3,342 posts
  • LocationNewcastle upon Tyne, UK

Posted 03 April 2006 - 01:08 AM

Anything that sends headers MUST come BEFORE ANY output!

session_start(); is often simply placed at the very top of the file as you can set it and forget it!.

Unless you are using outout buffering for caching then NO output should come before ANYTHING that has to send headers.
follow me on twitter @PHPsycho

#3 briguy9872

briguy9872
  • Members
  • PipPip
  • Member
  • 11 posts

Posted 03 April 2006 - 01:36 AM

[!--quoteo(post=361057:date=Apr 2 2006, 08:08 PM:name=ToonMariner)--][div class=\'quotetop\']QUOTE(ToonMariner @ Apr 2 2006, 08:08 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Anything that sends headers MUST come BEFORE ANY output!

session_start(); is often simply placed at the very top of the file as you can set it and forget it!.

Unless you are using outout buffering for caching then NO output should come before ANYTHING that has to send headers.
[/quote]

Thank you. i will try that




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users