这张照片是我的 2 个表格和列,我想制作:表格成员
中的
“名字”作为$username表格帐户中的
“密码”作为我的登录面板的$password 。
这是我的表格和列:
我的问题是,如果我加入了表格,我不知道我可以在会话中放什么
if($countacc==1){
$_SESSION['-------this is my problem---------']=$rowacc[0];
$_SESSION['-------this is my problem---------']=$rowacc[1];
$_SESSION['-------this is my problem---------']=$rowacc[2];
$_SESSION['-------this is my problem---------']=$rowacc[3];
header("location: index.php");
}
这是我的完整代码:
<?
session_start();
include "connector.php";
$username=mysql_real_escape_string($_POST['user']);
$password=mysql_real_escape_string($_POST['pass']);
$sqlacc="SELECT * FROM members INNER JOIN accounts ON
account.mem_id =members.mem_id WHERE members.firstname='$username' and accounts.password='$password'";
$resultacc = mysql_query($sqlacc);
$countacc = mysql_num_rows($resultacc);
$rowacc = mysql_fetch_array($resultacc, MYSQL_NUM);
if($countacc==1){
$_SESSION['-------this is my problem---------']=$rowacc[0];
$_SESSION['-------this is my problem---------']=$rowacc[1];
$_SESSION['-------this is my problem---------']=$rowacc[2];
$_SESSION['-------this is my problem---------']=$rowacc[3];
header("location:content/index.php");
}
else{
header("location:login.php");
}
?>
对不起,如果我的英语语法错误。