Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Photo upload preview

Status
Not open for further replies.

lazydays

Technical User
Sep 29, 2003
93
GB
I have a script which uploads a photo to my server.

However, I want to be able to preview this before actually uploading the photo.

Is there any way this can be done in PHP?
 
before uploading the file to the server: not with php
 
Erm thanks...but the guy I am doing the site for wants to preview the photos before uploading - through the website.

I could upload before the preview and then delete if the upload is not completed but why put that extra strain on the server.
 
You'll need Javascript or another client side language. As PHP is Server-side, it can only handle things on the server.

With Javascript you could create an image place holder and change its source dyanamically when a preview button is pressed.

For specifics go to the JS forum here:forum216

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Thanks! I'm not great with Javascript but will have a look!
 
Welcome. It should not be to hard, to dynamically change the source to whatever is in the file text box.



----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top