images, databases and copying... -need help fast!!!!

From: Date: Thu, 16 Nov 2000 08:29:16 +0000
Subject: images, databases and copying... -need help fast!!!!
Groups: php.db 
Request: Send a blank email to php-db+get-4463@lists.php.net to get a copy of this message
After days of consultaion with php/mysql experts I discovered that I was better off, storing images in directories, and filenames in mysql. The only problem is... that I am having trouble making the script that uploads the images. I want to upload two images, align adjustement and a description of the image. The images will be renamed into a blend of the current timestamp, what type of image (main or secondary) and file type. The problem is that I either get a blank page or I receive error about non existing files... If someone has some code that works, I would really appreiciate it if I could copy this... I have very little time to make this work, so please guys...! Here`s a little extraction of the code: Code marked with (X) are the lines I get errors on... $path1 = dirname($PATH_TRANSLATED)."/newsimages/"; $source = $file1 ; $now = time() ; (x) $info = getimagesize($file1); // Warning: Unable to open in /home/port/www.port-industry.com/admin/bilde_go.php on line 11 $prim_name = "hoved_$now.$info[2]" ; (x) $source_name = rename($file1_name,$prim_name) ; // Warning: Rename failed (No such file or directory) in /home/port/www.port-industry.com/admin/bilde_go.php on line 14 if(($source <> "none")&&($source <> "")){ $dest = $path1.$source_name ; if (copy($source,$dest)) . . . mysql input... I was hoping a few of you may have some code I could copy... I need to get this over and done with...fast!

« previous php.db (#4463) next »