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 1 of 1
  1. #1
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Security cookie and cookie checker.

    This is pretty hard what I'm about to ask...

    But, bear with me...


    Question:

    I am using a javascript password protection script to allow users access into my website, the script checks a .js file on the index page for the user names and passwords and see if they match to allow access, if the name and pass are correct and are there the script allows the user to be directed to the homepage of the site, if the name and pass are incorrect or do not exist the script doesn't redirect them into the page. I have the end of the code in the .js file here:

    // Your other commands here
    }window.location = "http://www.toxicseduction.com/home.htm"; [This is what happens when the name and pass are correct]
    }
    }
    }


    I am looking for a command to add above the redirect command that will leave a cookie for the users who have the correct name and pass.

    After the cookie is left they will be redirected instantly,

    but now I want a script for the homepage that the registered users were redirected to that will check to see if the cookie is there, and if it isn't they won't be able to see the content on the page.

    Does anyone know what I need to do this?

    Note: I will be encrypting the index page so that guests don't see the location of the .js file in the source and i will also be having the cookie placed on another site but loaded from my main site so that it's not saved when users choose to save my site so they got no idea of getting in.

    Can anyone help me here?

    Copyright for this question by Jose Contreras 2006.
    Last edited by toxicano; 12-15-2006 at 11:36 AM.


 

Posting Permissions

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