I kind of understand. But the database is not getting updated. I am using task_number as it is the primary key for the table, but using it to make sure each input name is different, (due to the fact that I have some javascript calendar popups for start and finish dates that needs the input name to be unique.)
the input names when I go to the page on the net are now:
//other stuff starting this form1
<input type="text" name="data[1][start]" value="">
<input type="text" name="data[1][finish]" value="">
//ending form1 on the page
//other stuff starting this form2
<input type="text" name="data[2][start]" value="">
<input type="text" name="data[1][finish]" value="">
//ending form2 on the page
//other stuff starting this form3
<input type="text" name="data[3][start]" value="">
<input type="text" name="data[3][finish]" value="">
//ending form3 on the page
etc...
I want to somehow get whichever form is being updated to post like:
$date_start=$_POST['start'];
$date_finish=$_POST['finish'];
the full update script is:
<?php require_once('db_fns.php');
$conn = db_connect();
if (!$conn)
return 'Could not connect to database server - please try later.';
$task_id=$_POST['task_id'];
$date_start=$_POST['start'];
$employee_start=$_POST['employee_start'];
$date_finish=$_POST['finish'];
$employee_finish=$_POST['employee_finish'];
$notes=$_POST['notes'];
$query = "UPDATE admin_tbl SET date_start = '$date_start', employee_start = '$employee_start', date_finish = '$date_finish', employee_finish = '$employee_finish', notes = '$notes' WHERE task_id = '$task_id'";
mysql_query($query);
mysql_close();
?>
Is this possible?