Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $con = mysql_connect("localhost","tez","cool");
- if (!$con)
- {
- die('Could not connect: ' . mysql_error());
- }
- mysql_select_db("tez_db", $con);
- $sql = "select name from login where user='$_POST["username"]' and pass='$_POST["password"]'";
- $num_rows = mysql_num_rows($sql);
- if($num_rows==0)
- {
- echo "login failed";
- }
- else
- {
- echo "welcome";
- }
- mysql_close($con)
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement