Guest kilbad Posted February 22, 2007 Share Posted February 22, 2007 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 Link to comment https://forums.phpfreaks.com/topic/39691-undetermined-number-of-data-items-what-is-best-method-of-input/ Share on other sites More sharing options...
pingu Posted May 13, 2008 Share Posted May 13, 2008 Did you find a solution to this? I need to do a similar thing with one off my sites... Cheers Dan Link to comment https://forums.phpfreaks.com/topic/39691-undetermined-number-of-data-items-what-is-best-method-of-input/#findComment-539808 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.