mysql - PHP - input a list of input fields into a database -
new.php (form) has section can clone input fields , values go array. when posting, these values added database via foreach loop.
e.g. <input type="text" name="number[]" />
edit.php (form) extract rows data , put them list of input fields.
how update mysql entry particular value? ajax , jquery, can rowid 'data-rowid' generated , update rowid = x. on submit. need go array or how can check against row id?
your appreciated.
you need submit rowid hidden input field posted along other information. way when edit.php have information need.
<input type="hidden" name="rowid" value="1">
and on edit can :
$rowid = $_post['rowid'];
Comments
Post a Comment