Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Jul 2005
    Location
    Haifa
    Posts
    22
    Member #
    10582
    I am working on a redirect script to log "out"'s. I was trying to do it with a header redirect:
    <?php

    // Log in database
    /*
    -snip-
    */

    // Send user away
    header ("Location: ".$url);
    ?>

    Does this seem like it should work? It doesn't. What is the correct syntax for these things? You can see the 'prototype' at http://lyricslist.com: Just click on the logo or the word "Song Lyrics" above the ads. Thanks in advance for any help.

    Dotan Cohen.

  2.  

  3. #2
    Senior Member rosland's Avatar
    Join Date
    Jul 2003
    Location
    Norway
    Posts
    1,944
    Member #
    2096
    Example:
    PHP Code:
    //This works
    $url "www.vg.no";

    header("Location: http://".$url): 
    Remember to use the "http://" in the Location call, otherwise you will just generate a local link.

    I.e.
    the URL will look like:
    "http://www.yoursite.com/www.vg.no" instead of "http://www.vg.no"
    S. Rosland

  4. #3
    Junior Member
    Join Date
    Jul 2005
    Location
    Haifa
    Posts
    22
    Member #
    10582
    I'm sorry, I should have snipped less. Yes, there is:
    <?php

    $url="http://english-lyrics.com";

    ?>

    and if I print $url to the screen, I do see http://english-lyrics.com

  5. #4
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    I clicked "Song Lyrics" and I went to http://www.lyricsfreak.com/

    So is this fixed?

    You have snipped your code but I am presuming you unset your sessions etc... as this is for logging out?

  6. #5
    Junior Member
    Join Date
    Jul 2005
    Location
    Haifa
    Posts
    22
    Member #
    10582
    Quote Originally Posted by bfsog
    I clicked "Song Lyrics" and I went to http://www.lyricsfreak.com/

    So is this fixed?

    You have snipped your code but I am presuming you unset your sessions etc... as this is for logging out?
    That certainly seems fixed. That is where it should have taken you. For whatever reason, it is not working for me. I even tried clearing the cookies and the cache. I wonder what the problem is. Any ideas?


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 06:24 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com