Jump to content

Clicking Submit on a Form Generates New Page in Ascending Increments


Mesden

Recommended Posts

I just want the user to be able to upload one file, and when they select the file and click submit, it send them to a randomly generated page. (ie. 1.php, then the next file to be uploaded is sent to 2.php, then the next file to be uploaded is sent to 3.php, etc...)

You're misunderstanding. Think when you upload a video to YouTube, when the video has finished uploading it generates a random page (ie.

)

 

Those mix of letters and numbering being the randomly generated page that the video was uploaded to. I need to do something similar with a file upload. A user uploads a file and it generates a page like that to show the information.

No, you're misunderstanding. There is one PHP script. The information at the end of the URL is probably a database key that is used to locate the file to be displayed.

 

What you need to do is have a script to process the uploaded file and store the access information in a database. The script then shows the user a URL like http://your.domain.com/get.php?x=dbkey which allows the user to get to the uploaded file.

 

When a user requests the file using the above URL, the "get.php" script will generate the correct page for that file.

 

Ken

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.