
May 27th, 2000, 10:29 PM
|
|
Junior Member
|
|
Join Date: May 2000
Posts: 3
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
thanks to Shiju for this code, inserting array from form into database. But it give an 'no such index in string error'. I tried $bands[]=HTTP_POST_VARS[band]; and all it does is insert the last value of the array
Garrick
$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);
}
|