I'm working on a website in PHP. Trying to load an image from a query string like so => <img src="load_image.php?name=Profile_Photo_Small" />
<img src="load_image.php?name=Profile_Photo_Small" />
how to do this? thanks :
Inside load_image.php file, you need to return your file with qualified headers.
code something like:
$filename = __DIR__ . '/images/' . $_GET['name'] . '.jpg';
I should also warn you about using query string parameters in your code directly. You need to clean your input data before use it .