SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    imagine no limitations exbabylon's Avatar
    Join Date
    Dec 2000
    Location
    Idaho, USA
    Posts
    452
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have a header re-direct if a person does not have a cookie set. It redirects them to signin.php I want signin.php to pass along a variable (hidden) to the page that thanks them for signing in, and use it in the head as a URL Redirect, timed to 0.

    Now I have this....

    If you go to mydomain.com/foo.php?action=lost you get redirected to mydomain.com/signin.php. Signin has a button they press agreeing to the terms, this is in a form, and is a submit button, in that form I have this hidden field:

    <input type="hidden" name="goto" value="<?php echo("$HTTP_REFFERER"); ?>">

    This however brings the value up blank... any ideas?

    Thanx
    Blamestorming: Sitting around in a group discussing why a deadline was missed or a project failed and who was responsible.

    Exbabylon- Professional Internet Services

  2. #2
    <? echo "Kick me"; ?> petesmc's Avatar
    Join Date
    Nov 2000
    Location
    Hong Kong
    Posts
    1,508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This should solve your problem:

    Your Code:

    PHP Code:
    <input type="hidden" name="goto" value="<?php echo("$HTTP_REFFERER"); ?>">
    My Code:

    PHP Code:
    <input type="hidden" name="goto" value="<?php echo($HTTP_REFERER); ?>">
    Basically, there are no quotes around $http_referer and referer doesn't have two F's

    Peter

  3. #3
    imagine no limitations exbabylon's Avatar
    Join Date
    Dec 2000
    Location
    Idaho, USA
    Posts
    452
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    that didn't work.... I have tried all forms of REFFER... just wondering if mabey I was off... but it seems that if I send a user to it via the HEADER function then I can't grab that as the refering URL... any help here would be appreciated.. I did just what you gave me and it again gave me this:

    Code:
    <input type="hidden" name="goto" value="">
    any help would HELP....

    god bless, and thanx for trying petemc
    Blamestorming: Sitting around in a group discussing why a deadline was missed or a project failed and who was responsible.

    Exbabylon- Professional Internet Services

  4. #4
    <? echo "Kick me"; ?> petesmc's Avatar
    Join Date
    Nov 2000
    Location
    Hong Kong
    Posts
    1,508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Did you actually have a refering page when you tried it.

    Also, It could be turned off.

    make a php script with this insode is:

    PHP Code:
    <?
    phpinfo
    ()
    ?>
    Load the page, scroll down and see whether HTTP_REFERER is listed. It may not be allowed...

    Also, create a plain php script with:

    PHP Code:
    <? echo("$HTTP_REFERER"); ?>
    And goto a site, then type in your URL and see whether it produces anything.


    Peter

  5. #5
    imagine no limitations exbabylon's Avatar
    Join Date
    Dec 2000
    Location
    Idaho, USA
    Posts
    452
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    does the REFERRER even work with Header redirects... my browser doesn't even let me go back to the page with which I was redirected from...

    so if I type in mydomain.com/foo.php and I get redirected to mydomain.com/signin.php my browser does not allow me, actually does not even recognize that I ever went to foo.php... any idea?
    Blamestorming: Sitting around in a group discussing why a deadline was missed or a project failed and who was responsible.

    Exbabylon- Professional Internet Services

  6. #6
    <? echo "Kick me"; ?> petesmc's Avatar
    Join Date
    Nov 2000
    Location
    Hong Kong
    Posts
    1,508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How about you create a page and see whether it works for us. Most people would be able to see it, however it must be just the browser you are using that is affecting whether you can see it or not.

    It would be great to upload and post a URL

    Peter

  7. #7
    imagine no limitations exbabylon's Avatar
    Join Date
    Dec 2000
    Location
    Idaho, USA
    Posts
    452
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok I got it up... If people promise not to play on it.
    How about exactly what I'm working on?

    Go here.

    http://www.beartoothbullets.com/load_data/add.php

    then you will be redirected to

    http://www.beartoothbullets.com/load_data/signin.php

    view source and see if the hidden fields goto are filled in

    thanx
    Blamestorming: Sitting around in a group discussing why a deadline was missed or a project failed and who was responsible.

    Exbabylon- Professional Internet Services

  8. #8
    <? echo "Kick me"; ?> petesmc's Avatar
    Join Date
    Nov 2000
    Location
    Hong Kong
    Posts
    1,508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Doesn't work for me, can't find signin.php???

    Do you use cookies?

    PEter

  9. #9
    imagine no limitations exbabylon's Avatar
    Join Date
    Dec 2000
    Location
    Idaho, USA
    Posts
    452
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sorry it's login.php

    http://beartoothbullets.com/load_data/login.php

    what I'm hoping is that

    http://beartoothbullets.com/load_data/add.php

    will redirect you to

    http://beartoothbullets.com/load_data/login.php

    and will show the URL that it was redirected from...
    Last edited by exbabylon; Feb 18, 2001 at 13:47.
    Blamestorming: Sitting around in a group discussing why a deadline was missed or a project failed and who was responsible.

    Exbabylon- Professional Internet Services

  10. #10
    <? echo "Kick me"; ?> petesmc's Avatar
    Join Date
    Nov 2000
    Location
    Hong Kong
    Posts
    1,508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Typo again?

    Peter

  11. #11
    imagine no limitations exbabylon's Avatar
    Join Date
    Dec 2000
    Location
    Idaho, USA
    Posts
    452
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sorry... what exactly I am trying to do just in case I haven't explained myself...

    a user bookmarks a page...

    http://www.beartoothbullets.com/add.php?action=add

    in order to get to that page in the begining, the user has to go through the aggreement page... so when he goes to that bookmarked page... it will redirect him to the login page... which will then have a hidden filed... that hidden field will contain the URL of the page they tried going to without the cookie.. then they will be redirected to that page which they were originally atttempting to go to after login....
    Blamestorming: Sitting around in a group discussing why a deadline was missed or a project failed and who was responsible.

    Exbabylon- Professional Internet Services


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
  •