PHP Question

Basicly i have a forum on my website, which submits to a PHP file on my server.

The php files saves the content and the file uploaded to the server, emails me the details and the uploader a confirmation email.

It then forwards onto my next page.

Is there any way i could make the Php file return the uploaded image link to display an image on the next page of what they just uploaded,

so for instance, if i put something like this on my next page,

img src =" / img/uploads/IMAGE-NAME.php " /

where IMAGE-NAME would be a variable that is returned from the php file,

Can you tell i dont know what i’m talking about??, haha

Thanks

Please give us some more information.
Where do u store the images, and what name do u give them.
What content should be/is on that 3rd side (the one ur forwarding to).
How do u forward them?

i guess all u need is:

3drPage.php?image=IMAGE-NAME
[php]echo ‘’[/php]

… but i need some more infos to tell.

image.php
[php]
header(“Content-Type: image/png”);
if (substr($_GET[‘file’], -3) == ‘png’ && is_file(’/path_to_your_files/’.$_GET[‘file’]))
readfile(’/path_to_your_files/’.$_GET[‘file’]);
[/php]
and invoke it:
img src ="/your_server_path/file.php?file=IMAGE_FILE"

My example is for png files only. If you want to provide another image type change header and file verification.

Sponsor our Newsletter | Privacy Policy | Terms of Service