OK, i'll give it a try, I have tried the following, but for some reason, it only ever adds 1 record, not 2 can you see why?
function update_table($value1,$option1,$value2,$option2) {
$user_id = mysql_insert_id();
if ($value1) {
$sql1="INSERT INTO table(user_id,value,option) ".
"VALUES ('$user_id','$value1','$option1')";
$result=db_query($sql1);
return true;
} else {
return false;
}
if ($value2) {
$sql2="INSERT INTO table(user_id,value,option) ".
"VALUES ('$user_id','$value2','$option2')";
$result=db_query($sql2);
return true;
} else {
return false;
}
}
Eventually I want to have 5 or 6 values to add!
Cheers
Ben