Results 1 to 7 of 7

Thread: Ok you scripting brainiacs..here's one for you

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2

    Default

    login.php

    Code:
    $come_from = $_SERVER['HTTP_REFERER'];
    
    if ($come_from == "site.com/login.php"){
    
    $redirect_url = $config['baseurl'] . '/' . $user_info['user_name'];
    
    }else{
    
    $redirect_url = javascript:history.go(-2);
    
     redirect($redirect_url)
    
    }
    $_SERVER['HTTP_REFERER'] isnt the best tracker to use for internal pages but the if else will prevent any bugs
    Last edited by carefree2; 05-15-2009 at 03:01 AM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •