RE: [PHP] image uploads
| From: | Weber Sites LTD | Date: | Tue, 31 Jan 2006 18:30:09 +0000 |
| Subject: | RE: [PHP] image uploads | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-229576@lists.php.net to get a copy of this message | ||
Check this out :
http://www.weberdev.com/get_example-3938.html
Image Upload And Resize Script
Sincerely
berber
Visit the Weber Sites Today,
To see where PHP might take you tomorrow.
PHP & MySQL Forums : http://www.weberforums.com
Learn PHP & MySQL Playing Trivia : http://www.webertrivia.com
-----Original Message-----
From: William Stokes [mailto:kalles@operamail.com]
Sent: Tuesday, January 31, 2006 6:58 PM
To: php-general@lists.php.net
Subject: [PHP] image uploads
Hello,
Is there something special about php and images that nobody told me...
I'm writing a image gallery but I have run to serious trouble with it. I
have one page with form in it. Form's action is $PHP_SELF. In the form there
is just one file field called "image".
I test if there's users image to handle with if (isset($img))
if there's one. I greate two new images using
imagecreatefromjpeg()
imagecreatetruecolor()
imagecopyresampled()
in two different functions. At the end of both functions there's
imagedestroy($img). After that the both image information is stored to DB
and, if succeful, at the end I do unset($img) to clear the old image
variable from memory. Both new images are created OK and DB update works OK.
But nothing else doesn't work. I don't know what I have to do to prevent the
image from realoading to server second time if user hits browser refresh
button. The same image is uploaded every time the user hits refresh. Another
thing is that Opera stopped co-operation with this page once and for all. It
just freezes after the page call's itself. IE and Firefox doesn't.
I Really need some help
Thanks
-Will
--
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php