Got the following problem.
i have a x amount of 2 textboxes next to eachother like ->
1:name="value[]" 2:name="value2[]"
1:name="value[]" 2:name="value2[]"
1:name="value[]" 2:name="value2[]"
now i'm trying to insert this into the database which goes fine except it isnt inserted like i want to.
all vars of value[] are being pasteed together and inserted as one. Same goes for value2[]
this is the code i'm using now.
Code: Select all
function return_($vars) {
$var = "";
foreach ($vars as $postvars) {
$var .= $postvars;
}
return $var;
}
$items=array('reference'=>return_($_REQUEST['ref']),'qty'=>return_($_REQUEST['qty']));
$result = $dbc->insert("zapatillas", $items) or die( $dbc->getError() );