I need to add a photo update function.
HTML form:
<form action="scripts/setImage.php" method="post">
<h3>Set my image:</h3>
Choose photo:<br><br>
<input type="file" name="file"><br>
<input type="submit" value="Sumbit">
</form>
PHP:
$file = $_POST['file'];
if (isset($_POST['file'])) {
$db->UPDATE("UPDATE users SET image = LOAD_FILE('$file') WHERE id = $idLogged");
}
And this doesn't work ;/ I think I can't use $_POST with files. I tried also $_FILES but it doesn't work as well.