I beg your brother elder sister to help the younger brother to hurry to cry

Source: Internet
Author: User




<title>Untitled Document</title>



Echo ";
Include "check_admin.php";
echo "Add a question bank

\ n ";
if (!$_post["type"])
{
?>






}
else if (!$_post["content"])
{
?>



}
Else
{

Include "config.php";
$type =$_post["type"];
$content =$_post["Content"];
$answer =$_post["Answer"];
if ($type!=1)
{
$sql = "INSERT into $db _examsystem_question (content,type,answer) VALUES (' $conten ', ' $type ', ' $answer ')";
$result =mysql_query ($sql, $my _con) or Die (Mysql_error ());
if ($result)
{
echo "Successfully added the question bank";
echo "Click here to return";
}
else echo "Error in adding a question bank";
}
Else
{
$check =$_post["Check"];
$sql = "INSERT into $db _examsystem_question (content,type) VALUES (' $content ', ' $type ')";
$result =mysql_query ($sql, $my _con) or Die (Mysql_error ());
$question _id=mysql_insert_id ();
$sql 2= "INSERT into $db _examsystem_answer (content,question,answer) VALUES";
for ($i =0; $i <4; $i + +)
{
$sql 2= $sql 2. " (";
$sql 2= $sql 2. "'". $answer [$i]. "',";
$sql 2= $sql 2. $question _id. "'";
if ($check = $i) $sql 2= $sql 2. " 1) ";
else $sql 2= $sql 2. " 0) ";
if ($i <3) $sql 2= $sql 2. "'";
}
$result 2=mysql_query ($sql 2, $my _con) or Die (Mysql_error ());
if ($result and $result 2)
{
echo "Successfully added the question bank";
echo "Stand-alone here return";
}
else echo "Error in adding a question bank";
}
}
Echo ";
?>

This is the teacher set up an online answer system I wrote this is one of the additions to the question bank part but my last confirmation button clicked will not jump to the database statement he always goes back to the previous step, that is, I can not save the written topic content into the database I've been bothering you for a week. Please help me brother elder sister humbly


Reply to discussion (solution)

123123

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.