I have tree pages, we call it first.php, second.php, third.php 
On My first.php page, I have form (LOGIN FORM)  and I'd action it to
second page. Like this Below
.... <form method="post" action="second.php">......

In my second page I'd tried to use header, for redirecting to third.php
after check the session, in my Session table in my Database, (and I've
got the session on my database.
---------------------------- second.php --------
..........
if ($row["result"]=="0") 
{
header("location: http://www.blabla/blablba/second.php?message=<font
color=red>Incorrect Password</font>");
}
elseif ($row["result"]!= 0) 
{
        $id = $result_data['id'];
        mysql_query("Delete from Session where user = '$id'", $cnx);
        $session_id = randSession();
        mysql_query("Insert into Session values('$id','$session_id')");
        if ($result_data["level"]==1)
        {
        header("location:
third.php?id=$id&session_id=$session_id");<--LINE 33
        }
        else
        {
        header("location: third.php?id=$id&session_id=$session_id");
        }
        
}
..........
-------------------------------------------------------

doesn't got redirecting to the third.php but I got error message  on my
second.php..., like this below.

Warning: Cannot add header information - headers already sent by (output
started at /home/unri/ketahanan-pangan/second.php:16) in
/home/unri/ketahanan-pangan/second.php on line 32

1. so how to use buffer for redirecting.... ????
2. is it right if I give the action(I mean Action Form) in my first.php
page to the second.php page..???,  

note : I have check my Session table On My database (MYSQL), and I got
it...

Help... 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to