Jump to content

PHP Image Upload and Display


robjames123

Recommended Posts

Hello there,

 

I'm a bit of an amateur with coding. I have a site setup and I'm trying to set something up to allow a user to upload an image and then for it to be displayed in a frame. I'm in the process of testing it before included it within my site.

 

I have a html page with a Browse facility which works fine, and an Upload button which calls upon PHP script but when it is called when I press the Upload button I am prompted to save the PHP file and nothing is uploaded into an allocated IMG folder I have setup and therefore nothing is displayed.

 

Any help would be greatly appreciated,

 

Rob James

 

 

 

 

 

Link to comment
Share on other sites

Are you running your site through a web server that supports PHP? If you're developing locally you can't just double-click on a file to open it in the browser, you need to use a web server which means you need to use a HTTP URL to access the pages. The web server is what executes the PHP code.

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