$id="select id from account where name='".$_SESSION['login']."'";if($_GET["tj"]=="modify") {if($_POST["submit"]){\x05mysql_query($sql="update user set level='".$_POST['level']."' where account_id='".$id."'");\x05echo "alert('修改成功');location='
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/23 18:04:26
$id="select id from account where name='".$_SESSION['login']."'";if($_GET["tj"]=="modify") {if($_POST["submit"]){\x05mysql_query($sql="update user set level='".$_POST['level']."' where account_id='".$id."'");\x05echo "alert('修改成功');location='
$id="select id from account where name='".$_SESSION['login']."'";
if($_GET["tj"]=="modify") {
if($_POST["submit"]){
\x05mysql_query($sql="update user set level='".$_POST['level']."' where account_id='".$id."'");
\x05echo "alert('修改成功');location='login.php';";
1、一共两个表 account和user 两个表里唯一互通的是ID.name都不同,但我想把A表ID定义出来让U表判断ID然后提升会员等级
2、我要如何把 account表里的id给定义出来呢,$_session['login']里定义的是name
$id="select id from account where name='".$_SESSION['login']."'";if($_GET["tj"]=="modify") {if($_POST["submit"]){\x05mysql_query($sql="update user set level='".$_POST['level']."' where account_id='".$id."'");\x05echo "alert('修改成功');location='
$id="select id from account where name='".$_SESSION['login']."' LIMIT 1";
$sql=mysql_query($id);
$res=mysql_fetch_assoc($sql);
.
mysql_query($sql="update user set level='".$_POST['level']."' where account_id='".$sql['id']."'");