move_uploaded_file() query

From: Date: Fri, 25 Jan 2002 09:35:15 +0000
Subject: move_uploaded_file() query
Groups: php.general 
Request: Send a blank email to php-general+get-82073@lists.php.net to get a copy of this message
Sorry for my past ignorance using this news site forum I can only out this down to my lack of knowledge. I have been work on me first script for some time now and have been making good progress up until now. I have a script that adds a author to the database, ID, Name, Email, Picture Name. When a author is added it uploads their details plus it uploads and renames the image...that is working fine. It all falls down when I try and call the new file name to show the picture. It is uploading the original file name to the database and not the renamed version. I would be very grateful for any pointers on how this small problem can be solved. I hope this makes more sense than previous threads I have submitted. Cheers Will Here is the script as it stands: $sql = "INSERT INTO $table_name (id, name, email, picture_name) VALUES ('$id', '$name', '$email', '$picture_name') "; $result = @mysql_query($sql, $connection) or die ("couldn't execute query"); if ($picture != "") { $path = "/home/main/main/php/"; $datee = date("sdFy"); move_uploaded_file($picture,$path . $datee . $picture_name); }

« previous php.general (#82073) next »