Click to See Complete Forum and Search --> : members only section
shellyb
04-24-2005, 07:40 AM
I look after a site for a flying club and they want a members only section. I have never done this before and want to know if there is a simple way. Can you have certain pages password protected (allowing one password to be used by all paying members) or would you have to create a username & password for each member. I would prefer the 1st option if possible. They also want a forum for members only so could this be incorporated in to the members only section of the site or would I have to do this seperately. I am not up on php or MySql yet, still getting my head around Xhtml, css, DHTML and javascript (so much to learn !!) so nay help is appreciated and/or direction to helpful sites/books. Thank you
Stephen Philbin
04-24-2005, 08:17 AM
By the sounds of it, you want something your http server would be best for handling. If your http server is apache then have a look around http://httpd.apache.org/ for something called "basic auth". If you're not on apache then I haven't got a clue.
Oh and whatever you do, unless you're using a properly encrypted connection, DO NOT trust it to protect sensitive data like credit card/banking details.
webgovernor
04-24-2005, 10:47 PM
Well, if you're not using apache.
Then why not try some SIMPLE PHP?
(I know you're still learning, but this is only a few commands)..
Here's a sample:
<?php
$password = "donkey"; //Your password
$formPass = $_POST['pass']; //'pass' is the name of the password text box
if ($formPass == $password) { //If the password match
?>
<!-- Authorize HTML goes here -->
<h3>You're Authorized! Yippee!</h3>
<? } else { ?>
<!-- Unauthorized HTML goes here -->
<h3>Hah! Wrong Password!!!</h3>
<? } ?>
That isn't the best way to do things, but it works,
and I'd use it as a last resort, if you would like
to know a mySql way to do it, just PM me,
I'll send the code to you, and a brief description of
setting up a mySQL db.
Good Luck!
Nedals
04-25-2005, 02:18 AM
If you are using Apache, try .htaccess. This can be used to protect a 'member' directory which could contain your member pages.
shellyb
04-25-2005, 05:32 PM
thanks for the replies. I think I can get away with something quite basic. The members pay by cheque so I don need to set up an online payment, just need to make the paying members feel a bit special by giving them access to a password protected part of the site. I guess if someone really wanted to they could find the password it its pasted in the html but there won't be anything of a sensitive. Not sure at present whether it is an apache server so would like to know more about possible coding options