I have a little problem over here this code doesn't work well what is the problem if anyone know ?
$getUsername = getUserData('Username');
$sql = "INSERT INTO `kladilnica` VALUES ('', '".$getUsername."', '".$betAmouth."', '".$gain."', '".$date."', '".$match1."', '".$match2."', '".$match3."', '".$match4."', '".$match5."',
'".$match6."', '".$match7."', '".$match8."', '".$match9."', '".$match10."', '".$match11."', '".$match12."', '".$match13."',
'".$match14."', '".$match15."', '".$match16."', '".$odd."')";
if($conn->query($sql) === false) {
trigger_error('Wrong SQL: ' . $sql . ' Error: ' . $conn->error, E_USER_ERROR);
} else {
$last_inserted_id = $conn->insert_id;
$affected_rows = $conn->affected_rows;
echo "Ticket added successfully.";
}
And also if someone can tell me how i can insert values into two tables using query ?