My code is:
<?php
include("connect.php");
mysql_select_db("cars",$conec);
car = array("BMW","Rolls-Royce","Lamborghini","Mustang");
color = array("red","green","blue","yellow");
?>
What I want to do is insert each car into a database and this is what I tried to do but I only get the id increasing becuase it is an auto-increment. This is my insertion code below:
for($i = 0; $i < 4; $i++){
$res = mysql_query("insert into auto (car,colors) values ('$car[$i]','$color[$i]')");
}