generate web pages based on uploads?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
akdrmeb
Forum Newbie
Posts: 1
Joined: Sat Sep 03, 2005 10:08 pm
Location: akron ohio

generate web pages based on uploads?

Post by akdrmeb »

anyone know the php solution to dynamically generate new webpages based on a visitor's upload? i want the new page to contain a predetermined template that I create and a picture that a visitor uploads.... any thoughts are appreciated

farf
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

You may need to clarify a little bit further.

If the file uploads have predetermined names, then redirecting to a correct page would be possible. However if you have no idea of what the name is, there's no way to guage what a file is (unless you do mime types to specify what kind of file).

Edit: I may have misunderstood your question. If you just want a users picture to display then that is easy. Just load your template after they submit, and then find the picture that they uploaded on your server to display as the image.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

search this forum for "uploading files" or visit the manual for uploading files.

You'll probably want to associate the files uploaded to the user who uploaded them and I'd do that in a MySQL table. You can then query off of the db for the file name (for their picture) and then dump it onto the page.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

why generate multiple (theoretically) identical pages? Why not use a php file to simply pull the appropriate information based on input. If you're worried about search engine indexing and junk where people want definite urls, then you can use mod_rewrite and/or path_info
Post Reply