Jump to content

Recommended Posts

I'm looking to create a form that will upload a file either picture or video and embed it in another page from a template.

I'm not looking for someone to give me the code just sort of the way to go about it.

Would it be inside a <div> or an <iframe> and what would create the blank plage a target_blank action or something?

Any help would really be appreciate.

Thanks in advance!

Link to comment
https://forums.phpfreaks.com/topic/274168-php-new-page/
Share on other sites

I don't really understand what exactly you're asking. So you're wanting a new page for every single thing that is uploaded?

 

Would it not be easier to possibly store the filename/filetype in a database and then retrieve it when the time comes? That way you would only need a couple of pages max. 1 to upload and 1 to display.

 

Actually you might not even need a database. You could pass through the filename as a GET or POST variable and grab it that way.

 

Take for example: http://www.examplesi...?file=image.jpg

 

and then on the display page:

 

<?php
$filename = $_GET['file'];
?>

<img src="images/<?php echo $filename; ?>" />

Edited by Kingy
Link to comment
https://forums.phpfreaks.com/topic/274168-php-new-page/#findComment-1410850
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.