为什么一直提示错误 请人帮我看下
网页提示 Notice: Undefined variable: sql in D:\web\www\cs\login.php on line 8
代码如下
<?php
$username=$_POST['username'];
$password=$_POST['password'];
//$password=md5($password);
echo $username,$password;
include('db.php');
$sql='SELECT * FROM `user` WHERE username='$username' and password='$password' limit 1';
echo "$sql";
$query=mysql_query($sql);
?>
------解决方案--------------------$sql=“SELECT * FROM `user` WHERE username='$username' and password='$password' limit 1”;