Jump to content

file upload to page


banditda
 Share

Recommended Posts

Hmm, I don't think that you want to create a html page for every picture that your user will upload!You can use header() to redirect them to a specific php page that will get is information from the url.

header('Location: yoursite.com/apage.php?img=the_number_or_name')------------ apage.php --------------if (!is_numeric($_GET['img'])) {	die();}$image = '<img src="images/.../'. $_GET['img'] .'.jpg" />';...

Link to comment
Share on other sites

how can I make a picture that a user uploads show up on a specified html page.
If you have the filename for a picture in a database, for example, or wherever you have it, then you can just display it in a normal img tag.<img src="<?php echo $image_filename; ?>">You can get that filename wherever you want, from a database or wherever you want to store it.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...