Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $username = mysql_real_escape_string($_POST['username']);
- $password = mysql_real_escape_string($_POST['password']);
- if ($username&&password)
- {
- $connect = mysql_connect("host","user","password"); or die("Couldn't connect to MySQL Database");
- mysql_select_db("dbname"); or die("Couldn't find MySQL Database");
- $query = mysql_query("SELECT * FROM users WHERE username='$username'");
- $numrows = mysql_num_rows($query);
- }
- else
- die("Please enter a Username and a Password");
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement