| | |
Image file upload to thumbnail
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
Hi does anyone know how to create a script that allows a user to upload an image to a website that shows as a thumbnail which when clicked allows user to view image at it's original size.
I've found some code (php) that allows user to upload image to server but it just puts it into a specifed folder.
It is for an academic website for doctors and pathologists and i need to create this so they are able to attach photos to their reports.
I've only been using php for a couple of days so i'm not even sure if it is possible in php or if i need to look at Flash CS3 a bit more.
Hope someone can help, fingers crossed.
I've found some code (php) that allows user to upload image to server but it just puts it into a specifed folder.
It is for an academic website for doctors and pathologists and i need to create this so they are able to attach photos to their reports.
I've only been using php for a couple of days so i'm not even sure if it is possible in php or if i need to look at Flash CS3 a bit more.
Hope someone can help, fingers crossed.
Hi.
The is definitely possible with PHP.
Take a look at the GD extension, specifically the imagecopyresampled function.
The is definitely possible with PHP.
Take a look at the GD extension, specifically the imagecopyresampled function.
•
•
•
•
Hi does anyone know how to create a script that allows a user to upload an image to a website that shows as a thumbnail which when clicked allows user to view image at it's original size.
I've found some code (php) that allows user to upload image to server but it just puts it into a specifed folder.
It is for an academic website for doctors and pathologists and i need to create this so they are able to attach photos to their reports.
I've only been using php for a couple of days so i'm not even sure if it is possible in php or if i need to look at Flash CS3 a bit more.
Hope someone can help, fingers crossed.
if u are able to upload image then solution should be
1.(problem thumbnail on the same page) using ajax call the image from the specfic folder and show to a particular size basically either fix height or fix width and vice versa. and onclick action show the original image
2.(problem thumbnail on another page after upload) It is easy call the image using php and similary fix it size by height or width and onclick show the original image
Help as an alias
I think programming is great................
Tour Travel weblink by me and about Tour ,
Go To My Home Page and I m in Webdevelopment.
I think programming is great................
Tour Travel weblink by me and about Tour ,
Go To My Home Page and I m in Webdevelopment.
Help as an alias
I think programming is great................
Tour Travel weblink by me and about Tour ,
Go To My Home Page and I m in Webdevelopment.
I think programming is great................
Tour Travel weblink by me and about Tour ,
Go To My Home Page and I m in Webdevelopment.
•
•
Join Date: Aug 2008
Posts: 381
Reputation:
Solved Threads: 33
•
•
•
•
Hi does anyone know how to create a script that allows a user to upload an image to a website that shows as a thumbnail which when clicked allows user to view image at it's original size.
I've found some code (php) that allows user to upload image to server but it just puts it into a specifed folder.
It is for an academic website for doctors and pathologists and i need to create this so they are able to attach photos to their reports.
I've only been using php for a couple of days so i'm not even sure if it is possible in php or if i need to look at Flash CS3 a bit more.
Hope someone can help, fingers crossed.
Yes you can upload images with PHP, move them, rename them, resize-scale-crop-background fill them and all that ...
If your website loads large images on the page and scales them smaller as thumbnails, this seems like a bad approach -- it would be better to upload the image and make a duplicate of it as a thumbnail, display the thumbnail, and when clicking the thumbnail image-link, display the full-sized image. This is the preferred way to consume less bandwidth on your server, make the page load faster, and have less chance of image distortion from scaling the image down from a larger size.
Yes the PHP GD library (http://us.php.net/manual/en/book.image.php) is the way to go for this type of image re-sampling, but it is a tricky library to use in many cases (in my experience) so look around for some good tutorials and examples.
I created a class to do some of this work for you and will go ahead and upload it here ... although since you are a newbie PHPer, it's ambitious of me to think you will be able to understand any of what I am doing here -- but you never know and you can play around with the image_upload.php file and see what you can learn from trying things out with it...
Hope something here helps
Google is the answer to all of your questions -- the trick is knowing what question to ask in your specific predicament.
Nikesh thank you i'll check out what you suggested for option one and langsor thanks for the code. You were right, i dont really understand what it is and which one i can use but i shall study it hard as it looks well commented.
Thank you all for a speedy response. I shall post again later on today if i cannot get my head around it, thanks again.
Thank you all for a speedy response. I shall post again later on today if i cannot get my head around it, thanks again.
![]() |
Similar Threads
- Generate Thumbnail images on the fly. (PHP)
- how to retrive image file from mysql databse using php (PHP)
- file upload (JavaScript / DHTML / AJAX)
- VBulletin Coder Needed ~ Thread Thumbnails (Software Development Job Offers)
- Square Image Thumbnail (PHP)
- php mysql image again PLEASE HELP (PHP)
- Php Mysql Image Question (PHP)
Other Threads in the PHP Forum
- Previous Thread: shopping card implementation
- Next Thread: Retrving data from database to form
| Thread Tools | Search this Thread |
.htaccess ajax apache api array beginner binary broken cache cakephp checkbox class cms code confirm cron curl customizableitems database date directory display download dynamic echo email error external file files folder form forms forum function functions google header headmethod howtowriteathesis href htaccess html iframe image include insert integration ip java javascript joomla limit link login loop mail malfunction menu mlm mod_rewrite multiple mysql oop paypal pdf php phpmysql problem query question radio random recursion regex remote script search select server sessions sms soap source space sql syntax system table tutorial update upload url validation validator variable video web xml youtube





