i have created reservation form housing. user fills form out , submits it. reservation record supposed made inserted reservations table. this code being inserted database record $reservationstable = "reservations"; $r1 = (rand(11111,99999)); createreservationrecord($reservationstable, [$r1, $date,$dormrecord[id], $_post["cwid"], $_post["firstname"], $_post["lastname"], $_post["class"], $_post["gender"], $_post["fullyequippedkitchen"], $_post["laundry"], $_post["specialneeds"]]); these functions transform data: function createrecord($table, $values) { echo "this working"; return insertinto($table, ["name","class","specialneeds","laundry","fullyequippekkitchen","roomsavailable","roomsreserved","roomcapacity"], $values); } function createreservationrecord($table, $values) { echo ...