View Single Post
  #20  
Old 11-28-2006, 05:54 AM
clanffa clanffa is offline
First Lieutenant
 
Join Date: Nov 2006
Posts: 180
Send a message via AIM to clanffa
Default Re: [TUTORIAL] Creating a login script for multiple users.

Quote:
<?php
$usernames = array("user1", "user2", "user3", "superman");
$passwords = array("pass1", "pass2", "password3", "supermans password");
$page = "testlogin.php";



for($i=0;$i<count($usernames);$i++){
$logindata[$usernames[$i]]=$passwords[$i];
}
if($logindata[$_POST['username']]==$_POST[be 'password']){ what is this "be"?
session_start();
$_SESSION[username]=$_POST['username']; Should
header('Location: '.$page); Should be header ('Location $page');
First 14 just incase heres the rest
Quote:
exit;
}else{
header('Location: login.php?wrong=1');
exit;
}
?>
__________________
Clan FFA-Halo 2 MLG, Machinima, and Glitch Clan
http://www.ffaproam.com/
Reply With Quote