Password protection for a membership list

  Tycho 10:20 28 Mar 05
Locked

I am busy building a club site for Lincolnshire Beekepers Association and feel that a convenient facility would be to have a list of members including phone numbers and email addresses on the site. I have sort out the data protection issues but would not want memebrs to be bothered by all and sundry. To this end I would like to password protect one page of data. All I need is for a single password to portect the page. All members would use the same password.

Could you point me in the right direction, please?

T

  mattyc_92 11:27 28 Mar 05
  harristweed 13:59 28 Mar 05

<?php
// register globals
function register_globals($form_array)
{
foreach($form_array as $name => $value)
{
$GLOBALS[$name] = $value;
}
}
register_globals($_POST);
// check password

if($password!=="euro" or empty($password))
{
// enter password
echo "<form action=\"$_SERVER[PHP_SELF]\" method=\"post\">\n";
echo "<table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"5\" cellspacing=\"0\"> ";?>
<tr>
<td>
Please enter your password</td>
<td><input type="password" name="password"></td>
</tr>
<tr>
<td>
<?php // check if password correct or even set
if ($password!=="password here!")
{
if (isset($password))
{
echo " Password Incorrect - please try again ";
}
}

?>
</td>
<td><input type="submit" name="Submit" value="Submit"></td>
</tr>
</table>
</form></td>
<?php
}
else
{
?>

rest of your page here


<?php
//close brace
}
?>

  harristweed 14:00 28 Mar 05

its a bit messed up

if you would like it, email me and i'll send it to you

  Tycho 08:38 29 Mar 05

Many thanks to all. that gives me lots to go on.

Incidentally, I deliberately inserted an email address into a web site which I wrote just to see if it would attract some spam. After fifteen months I have had no spam at all!

T

This thread is now locked and can not be replied to.

How to get Windows 10 for free | How to install Windows 10: There is still a way to avoid paying…

1995-2015: How technology has changed the world in 20 years

Alex Chinneck’s giant ice cube Christmas tree at Kings Cross

Apple rumours & predictions 2017: The iPhone 8, new iPads, and everything else you should expect fr7…