一直提示Undefined index: username
<input name="username" type="text" id="username" maxlength="10" />
if($news['user']==$_POST['username']&&$news['pass']==$_POST['password'])【报错部位】
好像$_post数据没能传过去
<input name="username" type="text" id="username" maxlength="10" />
if($news['user']==$_POST['username']&&$news['pass']==$_POST['password'])【报错部位】
好像$_post数据没能传过去
最新回答 / 慕哥0077054
mary是个字符串,要添加引号
最新回答 / 小小歪仔仔
id 和 pass 属性为字符,要加引号。
现在最后两句要改为
mysqli_select_db($link,'sys');【sys为要连接的数据库】
mysqli_query($link ,"set names 'utf8'");
mysqli_select_db($link,'sys');【sys为要连接的数据库】
mysqli_query($link ,"set names 'utf8'");
2017-03-16