First of all i want to give my coungrats to all this great community for the work that your building here
I want to creat a simple database to check a username with a password to output an url. This is for a account login script where only the admin can add, edit and delete the users account. Its to use with a login script in PHP like this:
Quote:
<?php
$username = $_POST['username'];
$password = $_POST['password'];
$url = "url";
$user_array = array("user1");
$pass_array = array("pass1");
$user_length = count( $user_array );
for ( $i = 0; $i < $user_length; $i++ )
{
if ( $username == $user_array[$i] && $password == $pass_array[$i] )
{
session_register("user");
session_register("loggedIn");
$_SESSION['user'] = $username;
$_SESSION['loggedIn'] = "true";
header("Location: $url");
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<p>Rong Password/Username, please make sure that you writed in correctly your Username and Password has provided</p>
<p> If you Lost your password or username please contact site admin</p>
<p> Thanks!! </p>
</body>
</html>
|
Hope that someone can help me on this, thanks and keep up the good work