Posted by Floortje on 05/18/07 19:15
> Thanks for the reply but what I want is like this (hypothetically):
>
> Student name [Peter] Enrolled? [] Date Enrolled [ ]
> Student name [John ] Enrolled? [] Date Enrolled [ ]
Iirc this works. didn't test it cause im lazy :-)
<input type="text" name="person[1][enrolled]">
<input type="text" name="person[1][date]">
<input type="text" name="person[2][enrolled]">
<input type="text" name="person[2][date]">
foreach ($_POST['person'] as $id=>$person)
{
$sql="UPDATE $db SET enrolled='".$person['enrolled']."',
date='".$person['date']."' WHERE id = '$person'";
// etc
}
--
Arjen
www.arjenkarel.nl -- my crappy excuse for a website (just gathering dust)
Navigation:
[Reply to this message]
|