|
#1
|
||
|
Members only area
I'm thinking about creating a trade area for my meditations shop, as I've had quite a few trade enquiries recently.
I would like to make it a separate area that trade customers can access when logged in - after they've applied for access. I've seen several sites which use this method, indeed I use some of them, but I'm not sure what I would need to do in order to create such an area. Can anyone tell me how, in simple terms? |
|
|
#2
|
||
|
What you are probably looking for requires a php script connecting to a MySQL database, which stores the user's details. The script verifies the username/password of the user and rejects or grants access to the prices. This technique also uses an encryption technique to store and retrieve the passwords. (Sorry if its a bit complicated)
A simple example script is shown below. <?php include("database.php"); $sql="SELECT password, random FROM user WHERE username = '$username' ORDER BY username"; $res=mysql_query($sql, $conn); $get = mysql_fetch_object ($res); $pass = "$get->password"; $ran = "$get->random"; $hash = MD5($ran); $encrytedpassword = md5($password.$hash); if ($pass == $encrytedpassword) { print "Welcome to the trade only area... etc etc"; } else { print "User access denied!"; } ?> This should also be helpful: http://webmaster.lycos.co.uk/topics/...hp/index.phtml
__________________
![]() |
|
|
#3
|
||
|
If you understand SQL then the above is recommended. If you prefer something simple you could always have a password protected page that changes monthly and you inform customers via a newsletter (which is also handy to show any special deals). Id prefer the script above, but unless someone can help or you have some knowledge on it, you could struggle to do it. Try searching for tutorials on Google.
__________________
|
|
|
#4
|
||
|
Look up .htaccess etc
__________________
Eat more chips! Dont let salad win! I am rob who runs hey - do you require a domain sales agreement? |
|
|
#5
|
||
|
Thanks for the replies. I don't understand it all enough to go ahead at the moment I don't think, so will do some reading and look into the links given.
Thanks |
|
|
#6
|
||
|
For an (almost) definitive list, see:
http://www.hotscripts.com/PHP/Script...ems/index.html I used to use php guard dog which was cheap and very good but it has now gone bust.... toooooo cheap perhaps!! You may also like to see the following thread in this forum: http://www.shell-livewire.org/forums...t=members+area |
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
|||||