image uploads

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux