JAI MATADI all ..
i have SIGNUP.PHP form and LOGIN.PHP form...
if the user already signed in then he will automatically go to PROFILE.PHP page ..
to do this i m doing this .. in my LOGIN.PHP
------------------------------------------------
<?php
//start the session
session_start();
//check to make sure the session variable is registered
if(session_is_registered('username')){
//the session variable is registered, the user is allowed to see anything that follows
header( "Location: profile.php" );
echo 'Welcome, you are still logged in.';
}
else{
//the session variable isn't registered, send them back to the login page
header( "Location: login.php" );
}
?>
--------------------------------------
but m getting this error(s) while m running my LOGIN.PHP
--------------------------------------
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\wamp\www\login and etc database\login.php:9) in C:\wamp\www\login and etc database\login.php on line 12
Deprecated: Function session_is_registered() is deprecated in C:\wamp\www\login and etc database\login.php on line 15
Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\login and etc database\login.php:9) in C:\wamp\www\login and etc database\login.php on line 26
------------------------------------
tell me .. where i m going wrong ..
thank you ..
i have SIGNUP.PHP form and LOGIN.PHP form...
if the user already signed in then he will automatically go to PROFILE.PHP page ..
to do this i m doing this .. in my LOGIN.PHP
------------------------------------------------
<?php
//start the session
session_start();
//check to make sure the session variable is registered
if(session_is_registered('username')){
//the session variable is registered, the user is allowed to see anything that follows
header( "Location: profile.php" );
echo 'Welcome, you are still logged in.';
}
else{
//the session variable isn't registered, send them back to the login page
header( "Location: login.php" );
}
?>
--------------------------------------
but m getting this error(s) while m running my LOGIN.PHP
--------------------------------------
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\wamp\www\login and etc database\login.php:9) in C:\wamp\www\login and etc database\login.php on line 12
Deprecated: Function session_is_registered() is deprecated in C:\wamp\www\login and etc database\login.php on line 15
Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\login and etc database\login.php:9) in C:\wamp\www\login and etc database\login.php on line 26
------------------------------------
tell me .. where i m going wrong ..
thank you ..