session_start();
$coon_ = "localhost";
$name_ = "root";
$password_="root";
$error_ = "无法连接数据库1,请重来";
$conn=mysql_connect($coon_,$name_,$password_) or die($error_);
mysql_select_db("abc")
or die($error_);
mysql_query("SET NAMES 'gbk'");//解决汉字
$row = mysql_fetch_assoc(mysql_query(" SELECT pass,qx,sex FROM users where name = '$username' and pass = '$pass'"));
$dl_mima=$row[pass];$dl_qx=$row[qx];$dl_sex=$row[sex];
if($dl_mima=="")
{
echo "";
echo "
很多这种登陆的例子,百度一下就能找到这种表单提交的代码