If you want to create a simple php multiple-choice Q & A system and want to create a simple Q & A system, you may not be able to submit the system if you encounter any difficulties. please help. thank you ~! & Lt; html & nbsp; xmlnswww. w3.org1999xhtml & gt; & lt; head & gt; & lt; meta & nbsp; http-equivContent-Type & nbsp; contenttexthtm wants to be a simple php multiple choice question answering system
If you want to make a simple Q & A system, you may not be able to submit it if you have any difficulty. please help me. thank you ~!
Q &
Verification page
Header ('content-type: text/html; charset = utf-8 ');
Include_once ('Conn. php ');
If ($ _ POST ['T1'])
{
$ T = 0;
$ T1 = $ _ POST ['T1'];
$ T2 = $ _ POST ['T2'];
$ T3 = $ _ POST ['t3 '];
$ T4 = $ _ POST ['T4 '];
$ T5 = $ _ POST ['t5 '];
If ($ t1 = 'C ')
{
$ T + = 20;
}
If ($ t2 = 'd ')
{
$ T + = 20;
}
If ($ t3 = 'B ')
{
$ T + = 20;
}
If ($ t4 = 'C ')
{
$ T + = 20;
}
If ($ t5 = 'B ')
{
$ T + = 20;
}
}
$ SQL = "UPDATE 'information '. 'user' SET 'sorce '=' $ t' WHERE 'user '. 'username' = '". $ _ COOKIE ['user']. "';";
Mysql_query ($ SQL );
$ Num = mysql_affected_rows ();
If ($ num> 0)
{
Echo "script" alert ('Your score is $ t'); location = 'index. php'; script ";
}
Else
{
Echo "script" alert ('system error! '); Location = 'login. php'; script ";
}
?>
------ Solution --------------------
Your form is wrong.
1.6 horses and horses ran 6 kilometers in a big car. how many kilometers did 6 horses run in total?
A.6
B .16
C.16
D.36
2. what do rabbits and turtles never lose?
A. Long jump
B. high jump
C. sit-ups
D. race
3. James's mother: "James cut potatoes !" James: "cut, I don't want to cut it! Question: Do you want to cut potatoes?
A. cut
B. not practical
C. hesitate
D. I don't know.