1$query = "INSERT INTO contracts(`filename`,`filedata`, `filetype`,`filesize`) VALUES (?,?,?,?)";
2$stmt = $con->prepare($query);
3$null = NULL;
4$stmt->bind_param("sbsi", $filename, $filedata, $filetype,$filesize);
5$stmt->send_long_data(1, file_get_contents($_FILES['upload']['tmp_name']));
6$stmt->execute();