Answers for "php prepared statement upload file"

PHP
0

php prepared statement upload file

$query = "INSERT INTO contracts(`filename`,`filedata`, `filetype`,`filesize`) VALUES (?,?,?,?)";
$stmt = $con->prepare($query);
$null = NULL;
$stmt->bind_param("sbsi", $filename, $filedata, $filetype,$filesize);
$stmt->send_long_data(1, file_get_contents($_FILES['upload']['tmp_name'])); 
$stmt->execute();
Posted by: Guest on May-14-2020

Code answers related to "php prepared statement upload file"

Browse Popular Code Answers by Language