FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


'members only' section of website





TRANScend
I'm sure that I've missed where someone else has posted this kind of question before, so my apologizes in advance if that is the case.

Ok. So I'd like to have a password-protected 'members only' section on my website (which will include a YaBB message board, downloads, etc.), but it's been a LONG TIME since I've done anything like that. Any suggestions for the best way to go about it? Obviously a simple javascript or something would expose the password in the source code, which isn't a great thing... wouldn't it? So... what should I do? I'll need a way for members to log in to the YaBB board, but that comes with the perl script in the open source stuff you download from them, I think. What I'm looking for moreso are suggestions for a way to have just a password-protect on a section of the site that I could give out to people... I think. Help?

Thank you!
RadioPunker
I would suggest learning php. PHP is very secure and you cannot view the source code so they couldnt get the password that way. Something similar to the below would work:

---------HTML Document, can be named anything

<html>
<form action="login.php" method="post">
Password: <input type="text" name="pass">
<input type="submit" value="Login">
</form>
</html>

---------login.php

<?php

$password = $_POST['pass'];
$password2 = "Admin"; //can be anything
if ($password == $password2) {

MEMBERS ONLY CONTENT HERE!

}
else {
echo "Incorrect password!";
}

?>

Hope this helped!
raver
http://www.frihost.com/forums/viewtopic.php?p=125896&highlight=#125896
here you go..i hate repeating myself...there you have a small code written by me that shows you how a login script must work in php/mysql...if you have any questions about it feel free to ask me.
JustaMin
A very very simple way is to use .htaccess and .htpasswd to protect a member's directory. No code needed and very secure.
gameking
I suggest http://www.hotscripts.com/Detailed/51314.html this 1 because it has many functions:
1. password retriever Cool
2. admin cp Cool
3. build in to a site Cool

PS: U MUST have a database!!!!!! Mad Cool
Related topics
Memberships to MyEzy
Sim and Sim New Relaunch!
Graphics Section
MistuhGriddlez.frih.net
Need Your Input*Easy Contest*Please Read*
Login Scripts..
m-productions homepage TEMP
So... What happened to the Memberlist and Rules links?
Making money with my website...help!
Mario Ultimate - plz check out!
The directory
Session issue. Please Help.
How to stop joomla spam account creation
how can'i know that I have reached my 5 quality posts??
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.