html form input attribute

klsanjoh8456

New Member
Messages
17
Reaction score
0
Points
0
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.
 

stpvoice

Community Support Rep
Community Support
Messages
5,987
Reaction score
212
Points
63
Moved to programming help. This is not a free hosting support query.
 

Teensweb

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

vv.bbcc19

Community Advocate
Community Support
Messages
1,524
Reaction score
92
Points
48
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.
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
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'.
 
Top