出错,看不出来Parse error: syntax error, unexpected '$rows' (T_VARIABLE), expecting ',' or ';' in
代码<?phpinclude('config.php');include('conn.php');$username=$_POST["username"];$pwd=$_...
代码
<?php
include('config.php');
include('conn.php');
$username=$_POST["username"];
$pwd=$_POST["password"];
$sql="select*from tp_user where username='$username' and pwd='$pwd'";
$data=mysql_query($sql);
if(mysql_num_rows($data)){
$rows=mysql_fetch_row($data);
echo"name"$rows[1];
echo"pwd"$rows[2];
session_start();
$_SESSION['username']=$rows[1];
}
else{
echo"error";
}
?>
知道错误了,不需要回答了 展开
<?php
include('config.php');
include('conn.php');
$username=$_POST["username"];
$pwd=$_POST["password"];
$sql="select*from tp_user where username='$username' and pwd='$pwd'";
$data=mysql_query($sql);
if(mysql_num_rows($data)){
$rows=mysql_fetch_row($data);
echo"name"$rows[1];
echo"pwd"$rows[2];
session_start();
$_SESSION['username']=$rows[1];
}
else{
echo"error";
}
?>
知道错误了,不需要回答了 展开
1个回答
2016-08-05 · 知道合伙人生活技巧行家
关注
展开全部
试试这个:$inQuery="INSERTINTO'@__member'('mtype','userid','pwd','uname','sex','rank','money','email','scores','matt','spacesta','face','safequestion','safeanswer','jointime','joinip','logintime','loginip')VALUES('$mtype','$userid','$pwd','$uname','$sex','10','$dfmoney','$email','$dfscores','0','$spaceSta','','$safequestion','$safeanswer','$jointime','$joinip','$logintime','$loginip');";
追问
好乱~~
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询