I have bunch of employees, each employee have 7 days for their work schedule. I created the following form using php and would like get data from here to JavaScript for verification and then submit it to SQL database using ajax. My problem is how can I dynamically create these forms and then get values from their inputs? Dynamically creating them is the easy part.
<?php
function getNewEmployeeForm($name) {
$def_form = "
<tr name=\"" . $name ."\">
<td>".$name ."</td>
<td>
<input style=\"width:55px\" id='". $name ."' type=\"text\">
</td>
<td>
<input style=\"width:55px\" id='". $name ."' type=\"text\">
</td>
<td>
<input style=\"width:55px\" id='". $name ."' type=\"text\">
</td>
<td>
<input style=\"width:55px\" id='". $name ."' type=\"text\">
</td>
<td>
<input style=\"width:55px\" id='". $name ."' type=\"text\">
</td>
<td>
<input style=\"width:55px\" id='". $name ."' type=\"text\">
</td>
<td>
<input style=\"width:55px\" id='". $name ."' type=\"text\">
</td>
</tr>";
echo $def_form;
}?>