Hi All,
I am new to PHP. I want to redirect to new PHP page from thr current PHP.
I am trying to work with the login form. let me expain in detail what i did
when the user click submit the same page will get called say "login.php". once the login credentials success i am trying to redirect the page as below.
echo "<META HTTP-EQUIV=refresh content=0;URL=./forums.php?".SID.">";
before this i am starting session and saving the user name. i used the code below
session_start();
$_SESSION['username']=$uname;
now in forums.php i am trying to access the stored name from session as follows
<?php
session_start();
echo "The logged in user is= ".$_SESSION['username'];
?>
i am getting the name printed but along with that i am also getting some warning which is not necessary. the warning is
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\Documents and Settings\Rohitkumar\My Documents\Softwares\XAMPP Lite 1.6.5\xampplite-win32-1.6.5\xampplite\htdocs\xampp\site\forums.php:10) in C:\Documents and Settings\Rohitkumar\My Documents\Softwares\XAMPP Lite 1.6.5\xampplite-win32-1.6.5\xampplite\htdocs\xampp\site\forums.php on line 18
Please help me to solve this.
Thanks in advance