image uploads

From: Date: Tue, 31 Jan 2006 16:58:16 +0000
Subject: image uploads
Groups: php.general 
Request: Send a blank email to php-general+get-229570@lists.php.net to get a copy of this message
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

« previous php.general (#229570) next »