This has got me stumped. I am trying to update a table where a record ID = to the post ID with values. No luck at all.
This is what I have so far:
$commissions = preg_split('/\r\n|\n/', $_POST['commission'], -1, PREG_SPLIT_NO_EMPTY);
$id = preg_split('/\r\n|\n/', $_POST['id'], -1, PREG_SPLIT_NO_EMPTY);
//Iterate through array
foreach ($data as $val) {
mysql_query("insert into $table (commissions) values ('$commissions') WHERE id ='$id'");
}
My form looks like:
<input type="text" name="id" id="id[]" size="7" value="3">
<input type="text" name="commission" id="commission[]" size="15" value="100.00">
Any help will be GREATLY appreciated.