Retrieving a longblob image then upload it database

时间:2017-12-18 06:48:03

标签: php

I'm trying to get the currently logged in user's profile picture then upload it to my chat database how do i upload it without using the input type="file"

<?php
session_start
$uservalue = $_SESSION['username']; //sample session value

$selectuser="select * from table where user= '$uservalue'";
$result= mysqli_query($database,$selectuser);
$row = mysqli_fecth_array($result);

im trying to insert the image using

    $name = $row['username'];
    $image = $row['image'];
    $sql = "INSERT INTO chat (name,image) values ('$name', '$image') "

the datatype of my image is a longblob

0 个答案:

没有答案