We talked in another thread ( redirect instead of die ) I appreciate your answers there but decided to try this way, and opened a new thread because the subject is different and that thread had became too long.
account.php is going to be a membersOnly area.
when visitors that have not logged in, click account.php, I redirct them to a login form on message.php
This is message.php itself ( please have a look. it's safe)
In the centric td ( table data or cell), I display the login form. like this
I know about the "headers already sent" and session_start. so included the session_start on top of message.php. But users are receiving this error upon login:
Warning: Cannot modify header information - headers already sent by (output started at g:\programs(2)\easyphp1-8\www\ha\previous\new folder\another\htdocs\message.php:17) in g:\programs(2)\easyphp1-8\www\ha\previous\new folder\another\htdocs\global.php on line 27
Warning: Cannot modify header information - headers already sent by (output started at g:\programs(2)\easyphp1-8\www\ha\previous\new folder\another\htdocs\message.php:17) in g:\programs(2)\easyphp1-8\www\ha\previous\new folder\another\htdocs\global.php on line 28
this is line 26 to 30 of global.php and I'm not finding a session_start there.
Code: Select all
function redirect($url) {
header("HTTP/1.0 302 Found");
header("Location: $url");
exit();
}thanks