Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $host="mysql10.000webhost.com";
- $username="";
- $password="";
- $db_name="";
- $tbl_name="Users";
- mysql_connect("$host", "$username", "$password")or die("cannot connect");
- mysql_select_db("$db_name")or die("cannot select DB");
- $myusername=$_POST['username'];
- $mypassword=$_POST['password'];
- $myidentify=$_POST['id'];
- $sql= mysql_query("SELECT * FROM $tbl_name WHERE username='$myusername' and password='$mypassword' and id='$myidentify'");
- $rows = mysql_fetch_array($sql);
- $username = $rows['Username'];
- if ($username == $myusername) {
- setcookie("cookie_username", $myusername, time()+3600);
- setcookie("cookie_password", $mypassword, time()+3600);
- setcookie("cookie_password", $myidentify, time()+3600);
Add Comment
Please, Sign In to add comment