patrickstrijdonck
Programmer
Hi all,
im trying to let a hyperlink work, when that is clicked the page checkstatus.php will open containing this code
when i try the page i get this error:
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/cmict/domains/cmict.nl/public_html/bhv/checkstatus.php:2) in /home/cmict/domains/cmict.nl/public_html/bhv/checkstatus.php on line 3
what im trying to do is; php must get a record from the mysql database, a record similiar to the users emailadres, wich is
after that is done, php must decide wich off the 3 fields is "1", is a field is "1" it must open the right php file.
I tried to mess with the code but all i can get is this error or an empty page...... whole blank page.
Can someone help me with this??
Greetz
Patrick
im trying to let a hyperlink work, when that is clicked the page checkstatus.php will open containing this code
Code:
<?php
session_start();
include 'dbc.php';
$useremail = $_SESSION['user'];
$result = mysql_query("SELECT rayon, bedrijf, cursus FROM users WHERE user_email = '$user_email'");
while($row = mysql_fetch_array($result))
{
$rayonon = $row['rayon'];
$bedrijfon = $row['bedrijf'];
$cursuson = $row['cursus'] ;
if ( $rayonon == 1 ) {
header("Location: rayon.php");
exit();
} else {
;
}
if ( $bedrijfon == 1 ) {
header("Location: bedrijf.php");
exit();
} else {
;
}
if ( $cursuson == 1 ) {
header("Location: cursus.php");
exit();
} else {
;
}
}
exit();
?>
when i try the page i get this error:
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/cmict/domains/cmict.nl/public_html/bhv/checkstatus.php:2) in /home/cmict/domains/cmict.nl/public_html/bhv/checkstatus.php on line 3
what im trying to do is; php must get a record from the mysql database, a record similiar to the users emailadres, wich is
Code:
$_SESSION['user']
I tried to mess with the code but all i can get is this error or an empty page...... whole blank page.
Can someone help me with this??
Greetz
Patrick