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 10 of 10
  1. #1
    New Coder
    Join Date
    Feb 2010
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    how do i create a disclaimer page that you must accept before entering my site?

    I am trying to create a disclaimer page that has links to my terms of use and privacy policy as well as a general disclaimer that you must accept before entering my website.

    Any tips on how to do this would be great!

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,500
    Thanks
    8
    Thanked 1,089 Times in 1,080 Posts
    If you use PHP SESSIONS, it will remember the agreement until the close their browser.
    If you use cookies, it will remember it all the time (but some people delete cookies).

    Which method would you like to use?

    In either case, it would require PHP and a tiny script on every protected page,
    that needs to check if the agreement was made.

    Your files (page) would need to be .php instead of .html, or using .htaccess to force
    the server to process .html as PHP scripts.

    No idea on your PHP experience, .htaccess experience, or if anything I said makes sense.

  • #3
    New Coder
    Join Date
    Feb 2010
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts
    here is the code I am using. It works, but it displays on EVERY page, i only need it on 1 page.... how can i do that?

    <script>
    var enter=confirm("example insert text.")
    if (!enter)
    window.location="http://www.google.com"
    </script>
    Last edited by dobber; 03-19-2010 at 01:33 AM.

  • #4
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    Don't use JavaScript, using a server side language like mlseim suggested is a far better solution.
    OracleGuy

  • #5
    New Coder
    Join Date
    Feb 2010
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have no clue how to do that... it is beyond my knowledge

  • #6
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,500
    Thanks
    8
    Thanked 1,089 Times in 1,080 Posts
    Give us a link to your site as it is right now.

  • #7
    New Coder
    Join Date
    Feb 2010
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

  • #8
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,500
    Thanks
    8
    Thanked 1,089 Times in 1,080 Posts
    Good ...
    Your site is using PHP.

    This will take a couple of changes and scripts to make it work.

    First, you need to create your "disclaimer page".
    Call the page "disclaimer.php" and make it look like the rest of your site (layout, banner, etc).
    Let us know when you have that page done.

    You can use a form, or use 2 graphic buttons ... you'll have to decide on which ...

    Using 2 graphic buttons:
    You will have 2 graphic buttons on that page "Agree" "Disagree"
    The agree button link will be something like this (with the path to your graphic button):
    <a href="agree.php?a=1"><img src="images/agree.png" alt="I Agree" title="I Agree" /></a>
    The disagree button link will kick them out to somewhere else? You decide on what that means.

    After you have a disclaimer page made, show it to us ...

    There will be a PHP script called "agree.php". That will be done later.
    And also some more coding to be added to your "index.php" file.

    Because of post #5, I'm not sure if the script changes you need will be possible without you having
    someone (a programmer) go in and make the changes. This will hard to "tell you what to do" using this forum.


    .
    Last edited by mlseim; 03-19-2010 at 07:49 PM.

  • #9
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,346
    Thanks
    11
    Thanked 589 Times in 570 Posts
    Quote Originally Posted by dobber View Post
    I am trying to create a disclaimer page that has links to my terms of use and privacy policy as well as a general disclaimer that you must accept before entering my website.

    Any tips on how to do this would be great!
    clicking a link and checkbox are both user-actions.

    don't put your main page as the root ("/"), put the landing page there.
    move the rest of the stuff to "/main/".

    then on "/", simply provide a link to "/main/" that's labeled something like "if you accept our terms, click here to enter the site."
    my site (updated 13/9/26)
    BROWSER STATS [% share] (2014/5/28) IE7:0.1, IE8:5.3, IE11:8.4, IE9:3.2, IE10:3.2, FF:18.2, CH:46, SF:7.9, NON-MOUSE:32%

  • #10
    New to the CF scene
    Join Date
    Jun 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Hi, can you help me through?

    Quote Originally Posted by mlseim View Post
    Good ...

    First, you need to create your "disclaimer page".Call the page "disclaimer.php"
    There will be a PHP script called "agree.php".
    more coding to be added to your "index.php" file.
    .

    Hi,, i would love to know how to to this. I,m building a website with an adult content and i need the disclaimer not just in index, so i need to do it the way you suggest. Can you take me through or suggest what code to look for?

    Thanks a milion,


  •  

    Posting Permissions

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