Page redirect help !

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Page redirect help !

    Hello guys, cn anyone share me a redirect sc that can be used for redirecting user back to login page if they have wrong username and password pls ?

    I've tried used header();
    Error show, cannot modify header already send by output

    Added after 3 minutes:

    Also have tried this code that i found from other sites 'location.replace()' but useless
    Last edited by tamucq; 30.04.11, 18:37.

    #2
    you have to use the header before any other headers eg:
    At top of page:
    PHP Code:
    if(not_logged_in){
    header('Location: login.php');
    exit;

    Comment


      #3
      use the reader location bro

      Comment


        #4
        Originally posted by something else View Post
        you have to use the header before any other headers eg:
        At top of page:
        PHP Code:
        if(not_logged_in){
        header('Location: login.php');
        exit;

        tq bro the code work fine on ma lava sc

        Comment

        Working...
        X