SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: Nda

  1. #1
    SitePoint Zealot kevinritt's Avatar
    Join Date
    Nov 2002
    Location
    Lynn, Massachusetts-United States
    Posts
    138
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Nda

    Hello,
    Does anyone have an idea of how I can use PHP to create an online NDA? What I would like to do is have the customer enter the site and see the Non-disclosure Agreement. After reading it, they check one of two radio buttons. If the say "YES, I Agree", they are brought into the site. If they check "NO, I Do Nt Agree" they are brought back to the homepage.
    Any help would be gretaly appreciated.

  2. #2
    SitePoint Addict trogdor1024's Avatar
    Join Date
    Oct 2004
    Location
    New Jersey
    Posts
    235
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you need to track these people (i.e. are you making them login?) or do you want it to ask each time the person comes back to the site?

  3. #3
    SitePoint Zealot kevinritt's Avatar
    Join Date
    Nov 2002
    Location
    Lynn, Massachusetts-United States
    Posts
    138
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For now this is a demo. Eventually a login in system will be developed.

  4. #4
    SitePoint Enthusiast nick b's Avatar
    Join Date
    Jan 2005
    Location
    Austin, TX
    Posts
    61
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you want this form to automatically function when the radio buttons are clicked or do you want your users to choose a radio button and then have them click a "submit" button?

    If you want an automatic response without the use of a "submit" button then javascript might be a better solution.
    Nick Bartkowiak
    SerenityDigital.com

  5. #5
    SitePoint Wizard cranial-bore's Avatar
    Join Date
    Jan 2002
    Location
    Australia
    Posts
    2,634
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ...although you will need a submit button as well for users with JS disabled.
    personally I'd use a submit button regardless, because if they mis-click or are just playing with the buttons they mightn't expect to be moved immediately.

    To do this with PHP:
    Create a form with the controls on it:
    Code:
    <form method='post' action='whateverthispageis.php'>
    <input type='radio' name='nda' value='yes'/> yes I agreee<br/>
    <input type='radio' name='nda' value='no' checked/> no I don't agree<br/>
    <input type='submit' name='submitButton' value='proceed'/>
    </form>
    Then on the same page detect their choice something like this:
    Code:
    <?php
    
    if(isset($_POST['submitButton'])) //If the user hit submit
    {
      if($_POST['nda']=='yes') //If they chose the yes radio button
      {
         echo "<p>Thanks for agreeing. <a href='secretpage.php'>View the content here</a></p>";
      }
      else echo "<p>You must agree to the NDA to view the content</p>";
    }
    ?>
    The above code doesn't actually redirect them. You could do that with a META tag, but I can't remember the syntax off hand.


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
  •