Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Dec 2007
    Location
    St. Louis, MO
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Allow access to Page A only from Page B, different sites, and no History.Previous

    Hi there,

    This looks like a great site for this kind of question.

    I have a website where all the access validation information is kept on a separate site. I planned to have a page on the validation site which allowed users to log in and then use a hyper link to jump to the content site.

    I figured I would prevent invalid users from accessing the content site by rejecting anyone whose previous site was not the specific one expected. Seems pretty easy, all I needed was a function to return the value of most recent URL visited. I even eventually found history.previous and though I had it until I realized it was Netscape only (not an option).

    I admit I am pretty new to all of this, I write code with a reference site in the background and a manual in one hand. So I figure I am not seeing something obvious.

    Please let me know if anyone has a solution for this. I greatly appreciate any time and effort spent in this assistance.

    Ceciltss

  • #2
    Regular Coder GO ILLINI's Avatar
    Join Date
    Jun 2005
    Location
    USA
    Posts
    634
    Thanks
    0
    Thanked 7 Times in 7 Posts
    well, I dont know about a secure way to do this in javascript... But I know many ways in PHP that are very simple. Sessions would be the simplest.
    If you dont know how to do this(or php at all) and your host supports it, pm or post in the PHP forum.

    -Adam
    Why not thank me?

    http://adamsworld.name

  • #3
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,603
    Thanks
    0
    Thanked 645 Times in 635 Posts
    You can't use a session between sites. Probably the best you can do is to set up a form that provides the access from the one to the other and include some hidden fields in the form that get POSTed to the destination page. That page can then check those fields to confirm the values they contain.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #4
    New to the CF scene
    Join Date
    Dec 2007
    Location
    St. Louis, MO
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile Thanks

    Thank you for your rapid replies. They tell me exactly what I need to know.

    I was really hoping I was overlooking something simple. At this point, I am going to bypass the problem and just accept everything. I will revisit the issue later in my copius free time.

    Thanks again.

    Ceciltss


  •  

    Posting Permissions

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