I have this jQuery code to add elements in a table row with an \"add\" button:
$(\"#add\").click(function() {
$(\'#selected &g
I would give every select
element a unique name, an array would also do well here, see this example:
$('#selected > tbody:last').append(' ');
and then just serialize the form before you send it in:
var my_data = $("form").serialize();
...
Edit: The complete example:
$("#add").click(function() {
$('#selected > tbody:last').append(' ');
});
^^^^^^^^^^^^^^^^^^^
and:
$('#course_update').click(function() {
var my_data = $("form").serialize();
$('#update_status').html('');
$.post('../update.php', my_data, function(data) {
$('#update_status').html(data);
return false;
});
});