I have managed to set the file upload to change the name of the file when
uploading, but when the file is uploaded it takes the original file name not
the renamed one....

image upload box is named 'picture' how do I get it to call the new file
name????

Thank you for your help so far everyone...

<?

$db_name = "altdb";

$table_name = "main";



$connection = @mysql_connect("www.main.net", "main", "main") or die
("couldn't connect.");

$db = @mysql_select_db($db_name, $connection) or die ("couldn't select
database.");

$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");

copy($picture,$path . $datee .  $picture_name);
    

}



?> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to