I looking for a membersship script that is like http://www.rocbeats.com/ When you click on beats it says you have to be registered to see this page. It also has a Members page where you can view your information change your password. I also want a page where they can register. Does anyone know where I can find this if not does anyone know how much points FRIH$ it will be to make one.
Looking for a membership Script
Heres the login jus edit the stuff
You need to use a db for this
| Code: |
| <?
function MakeTableLogins($database, $host, $db_user, $db_pass) {//create the logins table $linkID = mysql_connect($host, $db_user, $db_pass); mysql_select_db($database, $linkID); mysql_query("create table logins (user char(32), pasword char(32))", $linkID); } function Encrypt($string) {//hash then encrypt a string $crypted = crypt(md5($string), md5($string)); return $crypted; } function AddUser($database, $host, $db_user, $db_pass, $username, $password) { //add user to table logins $linkID = mysql_connect($host, $db_user, $db_pass); mysql_select_db($database, $linkID); $password = encrypt($password); $username = encrypt($username); mysql_query("insert into logins values ('$username', '$password')", $linkID); } function Login($database, $host, $db_user, $db_pass, $user, $password) { //attempt to login false if invalid true if correct $auth = false; $user = Encrypt($user); $linkID = mysql_connect($host, $db_user, $db_pass); mysql_select_db("$database", $linkID); $result = mysql_query("select password from logins where user = '$user'", $linkID); $pass = mysql_fetch_row($result); mysql_close($linkID); if ($pass[0] === (Encrypt($password))) { $auth = true; } return $auth; } ?> |
You need to use a db for this
and heres the register script you need to use the same db as the login script for this
Thease scripts where made of www.bestprems.com login membership area so if you ever get time please go there and thnx balla for them
| Code: |
| <?php
if ($submit) { $link = mysql_connect($server, $db_user, $db_pass) or die ("Could not connect to mysql because ".mysql_error()); mysql_select_db($database) or die ("Could not select database because ".mysql_error()); $insert = mysql_query("insert into $table values ('NULL', '".$_POST['username']."', '".$_POST['pass']."')") or die("Could not insert data because ".mysql_error()); echo "registered account succesfully"; } else { echo "<form action='?submit' method='POST'> Username: <input type='text' name='username' width='10'> PASS: <input type='text' name='pass' width='10'> <input type='submit' value='Register'> </form>"; } ?> |
Thease scripts where made of www.bestprems.com login membership area so if you ever get time please go there and thnx balla for them
Related topics
