<?php
$id=$_POST['id'];
$password=$_POST['password'];
$conn=mysqli_connect("localhost","root","zhonghongshun","empmanage");
if(!$conn->connect_error){
die("链接失败".$conn->connect_error);
exit();
}
$sql="select password from admin where id=$id ";
mysqli_query($conn,"set names utf8");
mysqli_select_db($conn,"empmanage");
$result=mysqli_query($conn,$sql);
if($row=mysqli_fetch_assoc($result)){
if($row['password']==md5($password)){
header("Location:empMange.php");
exit();
}
}
header("Localhost:login.php?errno=1");
exit();
mysqli_free_result($result);
mysqli_close($conn);
?>
我是新手_请多指教
子期不遇
慕勒0069038