I have a php script, which contain a BLOB session image. I want to insert it into the BLOB column.
my wrong code
<?php
require 'config.php';
$userName = "John";
$aVatar = $_SESSION['userImage']; //[BLOB] - from MySql BLOB image
$query = "INSERT INTO `users`(`username`, `avatar`) VALUES ('$userName', '$aVatar')";
if($conn->query($query) == TRUE){
echo "Done!";
}
?>
When i post this, it show's very long strings into my page! and the message bellow all:
