Dzetki
The Prodigal Son Returns
Well, i recently followed a few tutorials on how to make a rename file script for a file uploader, but it failed drastically. It keeps saying "No file name in: upload_rename_ac.php at line 10".
Heres my code:
Halp? ;[ I've tried my best to figure it out, but unfortunately i failed..
Also, how do i make it tell how many images it hosts? ;]
Heres my code:
PHP:
<?php
$file_name = $HTTP_POST_FILES['ufile']['name'];
$random_digit=rand(0000,9999);
$new_file_name=$random_digit.$file_name;
$path= "upload/".$new_file_name;
if($ufile !=none)
{
if(copy($HTTP_POST_FILES['ufile']['tmp_name'], $path)) //LINE 10
{
echo "Troll foodz uploaded!<BR/>";
//$new_file_name = new file name
//$HTTP_POST_FILES['ufile']['size'] = file size
//$HTTP_POST_FILES['ufile']['type'] = type of file
echo "Foodz Name :".$new_file_name."<BR/>";
echo "Foodz Size :".$HTTP_POST_FILES['ufile']['size']."<BR/>";
echo "Foodz Type :".$HTTP_POST_FILES['ufile']['type']."<BR/>";
}
else
{
echo "Troll foodz could not be uploaded!";
}
}
?>
Halp? ;[ I've tried my best to figure it out, but unfortunately i failed..
Also, how do i make it tell how many images it hosts? ;]