View Single Post
Old 07-09-2008, 07:47 PM   #7 (permalink)
sarmenhb
The Addict
 
sarmenhb's Avatar
 
Join Date: Jan 2008
Location: los angeles
Posts: 309
Thanks: 44
sarmenhb is on a distinguished road
Default

nm, got it to works thanks!!! this is what i did with the for loop

since the array variable names index will always match the quantity array index.

i did this

Code:
for($a=0;$a<=count($name);$a++) {

		
$query = mysql_query("insert into tbl_addrow values(null, '$name[$a]','$quantity[$a]')");
	
}
and it worked great, only problem i saw was that an additional empty row was inserted into the table cant see why or how that got there..
__________________
no signature set
sarmenhb is offline  
Reply With Quote