php - html form query using check boxes -


i developing a cancer risk assesment tool in phpmysql. user need select risks , symptoms html form containing check boxes , then choices checked against stored in database. form. html form asses cancer risk

here screenshots of data stored in mysql database submitted checkboxes checked against.

oesophageal_carcinoma_riskfactors_tbl riskfactors

oesophageal_carcinoma_symptoms_tbl symptoms

oesophageal_carcinoma_riskfactors_tbl response: table containing response user should after submiting html form checkboxes

in case checked html here

enter image description here

the response fetched query should come responseid = 1 response table.

how should table linking foreign keys , how should php code query database like.

nick, correct in comment when need "relations" table. suggest creating 1 table own primary key , 3 additional columns server foreign keys. e.g:

|id|risk_id|symptom_id|response_id| ___________________________________ | 1|    2  |   3      |     4     | 

and measure index foreign key columns.


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -