mysql_connect($this->localhost,$this->db_user,$this->db_password);
mysql_select_db($this->db_name);
}
function sql (){
$username=$_post['username'];
$password=$_post['password'];
$sql="select * from users where username='$username' and password='$password'";
$query=mysql_query($sql);
$num=mysql_num_rows($query);
if($num==1){
$_sesstion['username']="username";
$_sesstion['password']="password";
header("Location:admin.php");
}
else {
echo "يوجد حطأ باسم المستخدم او الباسوورد";
}}
{
$use=new mysql;
$use->sql();
exit();
}
?>
thats it
Oops, my bad. I was referring to this 👆. I didn't know it didn't get quoted.
Обсуждают сегодня