For the code to opt out of the course, the system prompts that no variables are defined.
After the withdrawal of the course submitted, the system prompts the error, 15th, 35, 38 lines have undefined variable "Xuehao" How should I modify?
<title>Retired Project</title>
##################### #退选课题界面3 ##########################
Include "config.php";
Include "header.php";? >
Extract ($_post);
$query = "SELECT * from $student _table where xuehao= '". $xuehao. "'";
mysql_query ("Set names ' GB2312 '");
$result =mysql_query ($query);
$row =mysql_fetch_array ($result);
$id = $row [' id '];
$query 1= "Select Number as sn,surplus as SSN from $jiaoshi _table where id= ' $id '";
mysql_query ("Set names ' GB2312 '");
$result 1=mysql_query ($query 1);
$row 1=mysql_fetch_array ($result 1);
if ($row 1[' sn ']==1)
{
$query 2=mysql_query ("Update $jiaoshi _table set xuehao= ' not selected ' where id= ' $id '");
$query 3=mysql_query ("Update $jiaoshi _table set surplus=surplus+1 where id= ' $id '");
}
Else
{
if ($row 1[' sn '-$row 1[' ssn ']) ==1)
$query 7=mysql_query ("Update $jiaoshi _table set xuehao= ' not selected ' where id= ' $id '");
Else
$query 6=mysql_query ("Update $jiaoshi _table set Xuehao=replace (Xuehao,concat ('". $xuehao. "', ' \ n '), ') where id= ' $id '" );
$query 8=mysql_query ("Update $jiaoshi _table set surplus=surplus+1 where id= ' $id '");
$query 5= "Update $student _table set id=0 where xuehao= '". $xuehao. "'";
mysql_query ("Set names ' GB2312 '");
$result 5=mysql_query ($query 5);
if ($result 5==true)
{
EchoExit Project Success! ";
echo "
";
Exit
}
Else
{
Echo
Return to the wrong, please go back to the election
";
echo "
";
Exit
}
}
?>
Share to:
------Solution--------------------
How do you change, after the change of the code sent out to see.
------Solution--------------------