hey guys.
I have a form that submits it's data into an aray
<input type="text" name="descrip[]" value="">
<input type="hidden" name="id[]" value="2">
now I would like to try and take each value from descrip[], and id[]... pare them up, and run a sql update query.
soo...
something like this.
$string=("UPDATE ".$album." SET descrip='".$descrip[]."' WHERE picture_id='".id[]."'");
I know I need to do something like a foreach loop some where. But my problem is i'm not sure how.
I have tried.
$descrip=$_POST['descrip'];
$id=$_POST['id'];
foreach($descrip as $value)
{
foreach ($id as $value1)
{
$string=("UPDATE ".$album." SET descrip='".$value"' WHERE picture_id='".$value1"');
}
}
but we all know that just will not work.
can any of ya all help me?