You are here: new to uploading files... « PHP Programming Language « IT news, forums, messages
new to uploading files...

Posted by jodleren on 02/14/07 20:54

Well, I looked at an example from this group, tried it, and tried to
use it - but it does not work when I do it like this in PHP4.

<table>
<tr><td><input type="file" name="newfile" size="25"></td></tr>
<tr><td><input type="submit" name="sub_new" value="Upload"></td></
tr>
</table></form>

and in the same file, but ealier:

if($_POST["sub_new"]!="")
{
print "<pre>";
print_r($HTTP_POST_FILES);
echo "Uploading: ";
echo $HTTP_POST_FILES['newfile']['name'];
$file=strtolower($HTTP_POST_FILES['newfile']['name']);
$uploadfile = "../somwhere/".$file;
echo $uploadfile;
if (move_uploaded_file($HTTP_POST_FILES['newfile']['tmp_name'],
$uploadfile))
echo "<font color=\"blue\">$file uploaded.</font><p>";
}

I am never able to get the filename... why?

/S

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация