24. februar 2004 - 20:14
Der er
8 kommentarer og 1 løsning
Session problem
Hejsa. Jeg får denne session warning. Warning: session_start(): Cannot send session cookie - headers already sent by (output started at index.php:20) in login_success.php on line 2 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at index.php:20) in login_success.php on line 2 Scriptet ser sådan her ud: <? session_start(); echo "Welcome ". $_SESSION['first_name'] ." ". $_SESSION['last_name'] ."! You have made it to the members area!<br /><br />"; echo "Your user level is ". $_SESSION['user_level']." which enables you access to the following areas: <br />"; if($_SESSION['user_level'] == 0){ echo "- Forums<br />- Chat Room<br />"; ?> <?php } if($_SESSION['user_level'] == 1){ echo "- Forums<br />- Chat Room<br />- Moderator Area<br />"; } echo "<br /><a href=mail.php>Mailbox</a>"; echo "<br /><a href=retkode.php>Change Code</a>"; echo "<br /><a href=index.php?page=logout>Logout</a>"; ?> håber at der er en som kan hjælpe..
Annonceindlæg fra HP
24. februar 2004 - 21:06
#2
Hvad står der op over det her ?? <? session_start(); echo "Welcome ". $_SESSION['first_name'] ." ". $_SESSION['last_name'] ."! You have made it to the members area!<br /><br />"; echo "Your user level is ". $_SESSION['user_level']." which enables you access to the following areas: <br />"; if($_SESSION['user_level'] == 0){ echo "- Forums<br />- Chat Room<br />"; ?> <?php } if($_SESSION['user_level'] == 1){ echo "- Forums<br />- Chat Room<br />- Moderator Area<br />"; } echo "<br /><a href=mail.php>Mailbox</a>"; echo "<br /><a href=retkode.php>Change Code</a>"; echo "<br /><a href=index.php?page=logout>Logout</a>"; ?>
25. februar 2004 - 16:40
#3
krydset, der står ikke noget foran, men i min index, laver jeg et script, ja. Men hvordan skal jeg så gøre??
27. februar 2004 - 13:17
#6
Fjern dem alle andre steder, for hvis du indsætter det i din index.php (og den bliver eksekveret hver gang), skal du ikke kører session_start() mere.