Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- //this pulls the variables from the flash movie when the user
- //hits submit. Use this when your global variables are off.
- //I don't know how to toggle global variables, so I just put
- //it in all the time ;)
- $user=$_POST['user'];
- $pass=$_POST['pass'];
- //connect to database
- if ($user && $pass){
- mysql_pconnect("mysql6.000webhost.com","a7313820_prang","p1rate") or die ("didn't connect to mysql");
- mysql_select_db("a7313820_users") or die ("no database");
- //make query
- $query = "SELECT * FROM users WHERE username = '$user' AND password = '$pass'";
- $result = mysql_query( $query ) or die ("didn't query");
- //see if there's an EXACT match
- $num = mysql_num_rows( $result );
- if ($num == 1){
- print "error=You're in&checklog=1";
- } else {
- print "error=Sorry, but your user name and password did not match a user name/password combination in our database. Usernames and passwords are entered in from a different file. Thank you for visiting test login script!!&checklog=2";
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement