我的 mysql 数据库中有以下表格。我正在尝试创建一个应用程序,它可以虚拟地评估某人是否可能患上食道癌。这个应用程序的目的是帮助人们早期发现癌症筛查,因为我在肯尼亚所有医院接受过的患者中有 99% 都处于癌症晚期,而我们无能为力仅仅因为他们缺乏关于癌症的信息。我在这个问题中包含的症状是为了帮助我理解关系数据库,以便我可以将它应用到实际应用程序中。我想要包含的癌症的风险因素和症状已经由我的同事研究过医务人员
#tblsymptoms - holds all symptoms
######################################
symptomID | symptom
-------------------------------------
1 Mass in the throat
2 Difficulty in swallowing
3 Lost weight lately
4 Heartburn
5 Hoarse-sounding cough
6 Vomit blood
#tblresponse - holds all responses
######################################
responseID | response
-----------------------------------------------------
1 Your symptoms suggest you have a problem
2 You may be having Oesophageal carcinoma
3 You dont have a throat carcinoma
#tblrelation - holds relation between response and symptoms
######################################
relationID | responseID | symptomID
-----------------------------
1 1 3
2 1 4
3 1 5
4 2 1
5 2 2
6 2 3
7 2 2
8 2 5
9 2 6
10 3 3
11 3 4
我想使用 html 表单中的复选框来查询数据库,这是表单的代码:
<form method="post" action="process.php">
<INPUT TYPE=CHECKBOX NAME="option[]" VALUE="Difficulty in swallowing" id="">Difficulty in swallowing<br>
<INPUT TYPE=CHECKBOX NAME="option[]" VALUE="Difficulty in swallowing" id="">Difficulty in swallowing<br>
<INPUT TYPE=CHECKBOX NAME="option[]" VALUE="Lost weight lately" id="">Lost weight lately<br>
<INPUT TYPE=CHECKBOX NAME="option[]" VALUE="Heartburn" id="">Heartburn<br>
<INPUT TYPE=CHECKBOX NAME="option[]" VALUE="Hoarse-sounding cough" id="">Hoarse-sounding cough<br>
<INPUT TYPE=CHECKBOX NAME="option[]" VALUE="Vomit blood" id="">Vomit blood<br>
<input type="submit" name="formSubmit" value="Diagnose me" />
</form>
现在,以防万一有人选择:Lost weight lately and Heartburn
脚本应该从 tblResponse>>>responseID=1 获取数据并显示给用户:
Your symptoms suggest you have a problem.
有人对我应该添加到带有复选框以查询数据库的 html 表单的代码有想法吗?