FRIHOSTFORUMSSEARCHFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Looking for a membership Script

 


xorcist
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.
NG
Heres the login jus edit the stuff
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
NG
and heres the register script you need to use the same db as the login script for this
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 Smile
Related topics

User Membership Script Needed....In Trouble really need 1 !
Dreamweaver - use of login by email and automatic reply
looking for a script.
looking for wap upload script
membership management script

looking for password gate script
Looking for a rating system script.
Looking for an email/attachment form script
Hot or Not PHP-Nuke script
Looking for a counter script.

What's the best PHP Wiki script?
Looking for a on-line HTML Calender Site
Help to find a script
Looking for temporary php work
Script for text area with html support
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

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