Hi, I am working on a web form that dynamically adds text fields as the user desires for multiple dates. In essence this is what happens... The user goes to the form, it has a primary date text field for the user, IF the user so desires he may add a date text field through clicking a button that says "Add Date". The javascript is as follows:
function addDate() {
current++;
var strToAdd = '<p><input type="text" id="date'+current+'" name="classDate'+current+'" class="required" /> <input type="text" id="alt'+current+'" name="classDate'+current+'" class="required" /></p>'
//console.log(strToAdd)
$('.dynDate').append(strToAdd)
$('#date'+current+'').datepicker({altField: '#alt'+current+'', altFormat: 'DD, d MM, yy'});
}
This adds two date fields to the form along with putting the jquery date picker on the form for each new date field. Exactly like this: http://jqueryui.com/demos/datepicker/#alt-field ...
Anyway, my question is how do I put the data into the MYSQL database with PHP from the dynamic text fields? Do I loop through them or what? I guess I am really not sure how to manipulate dynamic fields very well.
Thanks for any help!
Aaron