Results 1 to 3 of 3

Thread: secret page login
      
   

  1. #1
    sandor1980 is offline Corporal
    Join Date
    Oct 2005
    Posts
    14

    Question secret page login

    I already created a contact form with no proplem. It is working well, but now im trying to make a page where visitors must answer to my quastion firs. if it's correct the page will redirect to the next page. If not correct an error page will show up.

    For exemple:

    This is a restricted site!
    You have to know what city i was born in to see the next page.

    Anyone can help me?

  2. #2
    Watdaflip's Avatar
    Watdaflip is offline Major General
    Join Date
    Sep 2005
    Location
    Cincinnati, Ohio
    Posts
    2,119

    Default Re: secret page login

    You need to valid the form with a php script.
    Make a text field. Then do something like..

    <?
    $answer = $_POST['question'];
    if($answer == "New York")
    {
    header("Location: worked.html");
    }
    else
    {
    echo " This is a restricted site!<br>You have to know what city i was born in to see the next page.";
    }

    In POST['question'] - question is the name of the text field

    Register/Login Script
    Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script

  3. #3
    sandor1980 is offline Corporal
    Join Date
    Oct 2005
    Posts
    14

    Default Re: secret page login

    Thank You!!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49