Sorry if this is easy but I'm slightly new to programming so I'm having problems renaming a temporary uploaded file. Here is my code:
HTML:
<input type="file" class="upload-img" name="logo" id="image" accept="image/*" />
PHP:
if(move_uploaded_file($_FILES['logo'] ['tmp_name'], "images/".[logo])) {
print '<p> Your image has been uploaded </p>';
} else {
print '<p> There was an error with the image</p>';
}
Would anyone be able to tell me how to correctly rename the temporary uploaded image to 'logo'?
I currently get an error that says:
Warning: fopen(images/logo.png): failed to open stream: No such file or directory in /home/matos/public_html/pdftest/tfpdf.php on line 1443 FPDF error: Can't open image file: images/logo.png