+ Reply to Thread
Results 1 to 5 of 5

Thread: html form input attribute

  1. #1
    klsanjoh8456 is offline x10Hosting Member klsanjoh8456 is an unknown quantity at this point
    Join Date
    May 2011
    Location
    Cameroon
    Posts
    17

    html form input attribute

    i really need help. i have a hidden page on my website and i wish it to be available only to those i have giving a code. i can create a one line html form but i don\'t know how to attribute the specific input code for authorization before the hidden page will be available.thank you for helping.

  2. #2
    stpvoice's Avatar
    stpvoice is offline Community Support Rep stpvoice has a brilliant futurestpvoice has a brilliant futurestpvoice has a brilliant future
    Join Date
    Dec 2008
    Location
    United Kingdom
    Posts
    5,940

    Re: html form input attribute

    Moved to programming help. This is not a free hosting support query.


  3. #3
    Teensweb is offline x10 Lieutenant Teensweb is an unknown quantity at this point
    Join Date
    May 2008
    Posts
    352

    Re: html form input attribute

    Do something like:
    PHP Code:
    <?
    if($_POST["psswrd"]=="yourpassword")
    {
    echo 
    'your content';
    }
    else 
    echo 
    "Wrong password";
    ?>
    Save it as filname.php
    and the form will look something like:
    HTML Code:
    <form action="filename.php" method="post">
    password: <input type="password" name="psswrd" />
    <input type="submit" />
    </form> 

  4. #4
    vv.bbcc19's Avatar
    vv.bbcc19 is offline Community Advocate vv.bbcc19 is just really nice
    Join Date
    Jun 2010
    Location
    India
    Posts
    1,505

    Re: html form input attribute

    Quote Originally Posted by klsanjoh8456 View Post
    i really need help. i have a hidden page on my website and i wish it to be available only to those i have giving a code. i can create a one line html form but i don\'t know how to attribute the specific input code for authorization before the hidden page will be available.thank you for helping.
    You can put the page locked with database and password.
    What you need is ACL. or usergroups and password protected directories or files.
    In cpanel you can straight away do that but better way to program is to use database and ACL.
    BCV | Community Support Representative
    █ x10Hosting - Giving Away Hosting Since 2004
    Premium Hosting | VPS Services

  5. #5
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: html form input attribute

    Note that you can easily password protect folders using cPanel. Using this mechanism (HTTP Basic authentication), you can easily give different people different passwords, so you can revoke one person's credentials without impacting others'.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

+ Reply to Thread

Similar Threads

  1. Unable to open the default.html
    By mrben79 in forum Free Hosting
    Replies: 1
    Last Post: 05-23-2011, 07:16 PM
  2. Help me plz, coding HTML/JS Form with multiple selections??
    By coding_spartan in forum Programming Help
    Replies: 2
    Last Post: 05-23-2011, 11:16 AM
  3. problem with index html file
    By ironska88 in forum Free Hosting
    Replies: 1
    Last Post: 05-19-2011, 06:45 PM
  4. Online HTML Editor - Cpanel
    By garrettgoesrawr27 in forum Free Hosting
    Replies: 0
    Last Post: 05-19-2011, 03:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers