I used the kirupa tutorial on creating a flash login form and have a few questions:
1.) when user fills in username and password, how do i direct them to the appropriate page?
2.) i want each user to be directed to a certain page, how do i specify what username and password goes with what page.
<?
$user=$_POST[‘user’];
$pass=$_POST[‘pass’];
if ($user && $pass){
mysql_pconnect(“mysql.yourhost.com”,“yourusername”,“yourpassword”) or die (“didn’t connect to mysql”);
mysql_select_db(“yourdatabase”) or die (“no database”);
$query = “SELECT * FROM yourtable WHERE username = ‘$user’ AND userpassword = ‘$pass’”;
$result = mysql_query( $query ) or die (“didn’t query”);
$num = mysql_num_rows( $result );
if ($num == 1){
print “status=You’re in&checklog=1”;
} else {
print “status=Sorry, but your username/password is not correct.
Please contact Stoneworks.&checklog=2”;
}
}
?>
I am designing a site for a business who wants to allow customers to login access a page where they can check the progress of their project. the kirupa tutorial is perfect because the client can go in and designate usernames and passwords.
Thanks For all replies.