So I've got this code working right now but my header is abit of track. I would like it to send:
First value of hyllaArray with 'check=' infront of it
Second value of hyllaArray with 'check2=' infront of it,
And the third value with 'check3=' and so up to 'check10'. Is this type of print possible or do I need to use other functions?
$DB = new mysqli("localhost", "root", "", "book1");
$result = mysqli_query($DB, "SELECT * FROM booking WHERE itemID IN('$itemID1','$itemID2','$itemID3','$itemID4','$itemID5','$itemID6','$itemID7','$itemID8','$itemID9','$itemID10')");
$hyllaArray = array();
$itemArray = array();
while($row = mysqli_fetch_array($result)){
$hyllaArray[] = $row['Hyllplacering'];
$itemArray[] = $row['itemID'];
}
header('location: /webapp/admin.php?check=' . implode('&check2=', $hyllaArray) .'&itemid=' . implode('&itemid2=', $itemArray));
}
http_build_querywould make your life a lot easier/webapp/admin.php?check1=val1&check2=val2&check3=val3&itemId1=itemval1&itemId2=itemval2?