Uploading Image in PHP

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
youropensource
Forum Commoner
Posts: 26
Joined: Tue Aug 05, 2008 11:42 am

Uploading Image in PHP

Post by youropensource »

I need to display the progress bar when uploading image without page reloading in PHP.

Can you please give me the idea for that ?
User avatar
jaoudestudios
DevNet Resident
Posts: 1483
Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey

Re: Uploading Image in PHP

Post by jaoudestudios »

Look at JQuery with PHP
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Re: Uploading Image in PHP

Post by aceconcepts »

youropensource
Forum Commoner
Posts: 26
Joined: Tue Aug 05, 2008 11:42 am

Re: Uploading Image in PHP

Post by youropensource »

aceconcepts wrote:Here's one example: http://www.dynamicdrive.com/dynamicinde ... essbar.htm
thanks ! also need to show the image size, etc., without using CGI script. only use JS and PHP scripts , how can I do it ?
User avatar
Syntac
Forum Contributor
Posts: 327
Joined: Sun Sep 14, 2008 7:59 pm

Re: Uploading Image in PHP

Post by Syntac »

getimagesize() should do the trick.
youropensource
Forum Commoner
Posts: 26
Joined: Tue Aug 05, 2008 11:42 am

Re: Uploading Image in PHP

Post by youropensource »

Syntac wrote:getimagesize() should do the trick.
hmm... I want to get the image size when click the upload button, without page re-loading.
give the example code that's better for me ??
User avatar
Syntac
Forum Contributor
Posts: 327
Joined: Sun Sep 14, 2008 7:59 pm

Re: Uploading Image in PHP

Post by Syntac »

Just do an Ajax request to a PHP script that outputs the size of the image.

[EDIT] Oh wait... Is this happening before or after the file is uploaded?
youropensource
Forum Commoner
Posts: 26
Joined: Tue Aug 05, 2008 11:42 am

Re: Uploading Image in PHP

Post by youropensource »

Syntac wrote:Just do an Ajax request to a PHP script that outputs the size of the image.

[EDIT] Oh wait... Is this happening before or after the file is uploaded?
Get the image size before uploading image by using AJAX ?
User avatar
Syntac
Forum Contributor
Posts: 327
Joined: Sun Sep 14, 2008 7:59 pm

Re: Uploading Image in PHP

Post by Syntac »

Ohhhh... I thought you wanted to get the size after it was uploaded. Never mind then.
Post Reply