Home > Article > Backend Development > php+mysql develops the simplest online question bank and online question making system
This article mainly introduces the simplest online question bank developed by php mysql. The online question making system has a certain reference value. Now I share it with you. Friends in need can refer to the
question bank. It is very necessary for educational institutions, schools, and online education. There are also many third-party online question bank systems on the Internet. However, this case will let people in need understand the development ideas of the question bank. In fact, it is very simple. It is nothing more than a Form validation, database validation.
1. Build the form data first
2. Submit the form data to the form verification page through get or post, and match it with the database
3. Return the result and answer Correct or wrong
Build form:
index.php
题库
";
echo "
";
echo "
共".$allpage."道题,当前是第".$page."题
"; echo "Form Receive
check.php
alert('请选择一个答案!');history.go(-1);"; }else{ //查询数据库 $result = mysql_query("SELECT * FROM $tb WHERE id =".$id); while($row = mysql_fetch_array($result)) { $true = $row["true"]; $next_id = $id+1; if($xuanxiang == $true){ echo ""; }else{ echo ""; } } } ?>
Database configuration
config.php
next.php
Next question
题库
";
echo "
";
echo "
共".$allpage."道题,当前是第".$page."题
"; echo "Database structure
title --------Title
answer_A -----Answer A
answer_B -----Answer B
answer_C -----Answer C
answer_D ----- Answer D
true ---------Correct answer
score --------Score
Related recommendations:
php mysql realizes simple login registration and password modification webpage
The above is the detailed content of php+mysql develops the simplest online question bank and online question making system. For more information, please follow other related articles on the PHP Chinese website!