jfrancis5144
New Member
- Messages
- 6
- Reaction score
- 0
- Points
- 0
I've read the helpful thread "Password Protect a Page" - very helpful - and want to use the script at http://www.totallyphp.co.uk/scripts/password_protect_a_page.htm. Since I'm completely new at this, I need help customizing it for a page on my x10 site.
// Define your username and password
$username = "someuser";
$password = "somepassword";
Straightforward enough - I enter the username and password I want to use, right?
if ($_POST['txtUsername'] != $username || $_POST['txtPassword'] != $password) {
Do I substitute anything for 'txtUsername' and 'txtPassword' or leave those expressions as is?
<form name="form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
Do I substitute anything for 'PHP_SELF'? If so, what should I use?
I'm taking baby steps here and would appreciate your help. Thanks in advance.
John Francis
// Define your username and password
$username = "someuser";
$password = "somepassword";
Straightforward enough - I enter the username and password I want to use, right?
if ($_POST['txtUsername'] != $username || $_POST['txtPassword'] != $password) {
Do I substitute anything for 'txtUsername' and 'txtPassword' or leave those expressions as is?
<form name="form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
Do I substitute anything for 'PHP_SELF'? If so, what should I use?
I'm taking baby steps here and would appreciate your help. Thanks in advance.
John Francis
Last edited: