while (list ($day, $band) = each ($HTTP_POST_VARS)) {
insert day and band into database etc...
}
actually you won't get the $day and $band in this way..
you should separate your field name and values from the formfield.
while (list ($name, $value) = each ($HTTP_POST_VARS)) {
#separate the name and value from the form field.
#get the name and values one by one.
print $name.":".$value;
}
so you can't get the $day, $band values in single row for insertion.
you should do this in a different way to insert this row.
probably you can try something like this.
$bands=$HTTP_POST_VARS[band];
$days=$HTTP_POST_VARS[day];
for($a=0;$a<count($bands);$a++){
$query="INSERT INTO tbl set day='$days[$a]',band='$bands[$a]'";
mysql_query($query,$connection);
}
<input type="hidden" name="day[]>
remember,, you are not passing any value through this field.
And also you are missing " thier.
<input type="hidden" name="day[]">
------------------
SR -
shiju.dreamcenter.net
"The fear of the LORD is the beginning of knowledge..."
[This message has been edited by Shiju Rajan (edited May 23, 2000).]