Jump to content

Undetermined number of data items, what is best method of input?


Guest kilbad

Recommended Posts

This is a repost from another phpfreaks forum section, but I was told that AJAX might be the solution..

 

I have a type of data (medication names) that I want a user to input into a form, and then have those medications listed in a MySQL db in separate columns for each particular patient; so one row would look like:

 

Patient's Chart Number | first medication | second medication | third medication | and so forth..

 

My question is this: What is the best way, using PHP and/or javascript to have a user input multiple medications in a form when there is a different/undetermined number of medications that will need to be entered for each patient.  I don't want to have a form with a absolute number of text input fields because what if there are more medication than fields?  I also do not what to delimit the data in a single input field with spaces, commas, etc, because each medication will also have additional input fields that will need to be filled out (frequency, dosage).

 

Any ideas?  I just want to make sure I am smart about the way I do this.

 

Let me know if you need any clarification on what I have written.  Thank you all so much in advance!

 

Brendan

  • 1 year later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.