Results 1 to 7 of 7

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

Hybrid View

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

    Default

    Its missing a semicolon in the script, use this:


    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);
    
    }
    Last edited by carefree2; 05-15-2009 at 11:05 PM.

  2. #2
    Join Date
    May 2007
    Location
    Planet Earth
    Posts
    1,389

    Default

    grrrr why is this stuff never simple.

    It tries to return me to df2videos.com/login

    which is a blank page.

    I'll get a hold of a guy I know who is like way into PHP and stuff, I'll see if he come up with something. Thanks.
    Last edited by grynmoors; 05-16-2009 at 06:11 AM.
    If it's not fun, stop doing it!

  3. #3

    Default

    Just make your login a content "box" that gets included/required on any page that you need a login on. It displays the login form if you are not logged in, it submits to the current page since it is just included/required on any page so there is no need to redirect all over the place, and it displays a logout link when you are logged in.

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
  •