Mesden Posted July 7, 2010 Share Posted July 7, 2010 I want to be able to click submit on my webform and have it generate a new page each time someone uploads something. First time it would be 1.php, then 2.php, then 3.php, etc. Any ideas? Link to comment https://forums.phpfreaks.com/topic/206957-clicking-submit-on-a-form-generates-new-page-in-ascending-increments/ Share on other sites More sharing options...
kenrbnsn Posted July 7, 2010 Share Posted July 7, 2010 Why? Link to comment https://forums.phpfreaks.com/topic/206957-clicking-submit-on-a-form-generates-new-page-in-ascending-increments/#findComment-1082255 Share on other sites More sharing options...
tronicsmasta Posted July 7, 2010 Share Posted July 7, 2010 def why?? why not upload several files at once... Link to comment https://forums.phpfreaks.com/topic/206957-clicking-submit-on-a-form-generates-new-page-in-ascending-increments/#findComment-1082258 Share on other sites More sharing options...
Mesden Posted July 7, 2010 Author Share Posted July 7, 2010 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...) Link to comment https://forums.phpfreaks.com/topic/206957-clicking-submit-on-a-form-generates-new-page-in-ascending-increments/#findComment-1082268 Share on other sites More sharing options...
kenrbnsn Posted July 7, 2010 Share Posted July 7, 2010 That doesn't make any sense. If you want to present the user with a random experience every time they upload a file, that can be done in one script. Ken Link to comment https://forums.phpfreaks.com/topic/206957-clicking-submit-on-a-form-generates-new-page-in-ascending-increments/#findComment-1082269 Share on other sites More sharing options...
Mesden Posted July 7, 2010 Author Share Posted July 7, 2010 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. Link to comment https://forums.phpfreaks.com/topic/206957-clicking-submit-on-a-form-generates-new-page-in-ascending-increments/#findComment-1082273 Share on other sites More sharing options...
kenrbnsn Posted July 7, 2010 Share Posted July 7, 2010 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 Link to comment https://forums.phpfreaks.com/topic/206957-clicking-submit-on-a-form-generates-new-page-in-ascending-increments/#findComment-1082451 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.