0

How to display uploaded image from form to another page with php

Hello guys I created a form using html and this form should send the informations in another file called resume.php I don't know how to display the image uploaded by the user I Saw some codes in Google but they are using functions and I don't understand them If someone know a simple way using echo or something else please tell me Or if u know someone explaining it please let me know

22nd Nov 2022, 10:13 PM
nisrine alami
nisrine alami - avatar
2 Réponses
+ 3
The two ways I know about: You can change in PHP file automatically the name of uploaded file and then when you want to render it, check if file exists (for example giving "file".number.".png" filenames should work, then you can in dependency of what you want to do with file give it to the user for example in loop checking, if file with number+1 still exists. Another way you can try is to create a database with records of names of uploaded files and then accessing it when you want to display that image.
25th Nov 2022, 11:24 AM
Dominik Vladař
Dominik Vladař - avatar
+ 1
Thank you so much I will try the two methods
25th Nov 2022, 2:22 PM
nisrine alami
nisrine alami - avatar