View Full Version : echoed links that build & run sql statements dynamically (odbc)

11-23-2011, 06:28 PM
I am very new to php (but not programming) and have just inherited an nhs php website that links to an Access patient db via odbc for patient searching, adding records, etc.
The current setup displays a list of matching patients on screen by table echoing (name, dob, patient number, etc). I would like the patient numbers to be links which will build sql statements with the only variable being the patient number (e.g. SELECT * FROM tbl WHERE tbl.patNum=$patientNumber). So the user can fetch the patients details by clicking the link rather than retyping the patient number each time.
I've seen something similar with url's on this thread:
Can someone nudge me in the right direction to accomplish the same but with links that build and run sql dynamically when clicked?
Any advice or pointers would be much appreciated.