Good my php level is very basic as soon as I started, I would like to know how I can upload an image of the file to the server folder that I specify in $ uploaddir.
$uploaddir = '/var/www/html/galeria/fotos/';
$uploadfile = $uploaddir . basename($_FILES['foto']['name']);
if (move_uploaded_file($_FILES['foto']['tmp_name'], $uploadfile))
{
console_log("File is valid, and was successfully uploaded");
}
else
{
console_log("Possible file upload attack!");
}
This is a part of the program, after uploading images the user can see the entire gallery.