I was hoping someone could give some pointers on uploading a file. I am familiar with the various handicaps presented by the php.ini file interms of file size, timeouts etc... it's the actual program flow that has me stumped. Here's what I have thus far: (I am developing on a win2k platform running apache 1.3.20, but my production platform is Redhat, apache 1.3.19, just to make things even more happy)
if (isset($userfile)){
if (is_uploaded_file($userfile)) {
copy($userfile, "$userfile");
} else {
echo "No file was sent, however all data was submitted to the database.";
}
set_time_limit(180000);
move_uploaded_file($userfile, "//dir//$userfile");
I am using a simple form as follows:
<form action="sameFile.php" method="post">
Choose a file to upload: <INPUT NAME="userfile" TYPE="file"><br>
<input type="submit" name="submit" value="submit">
</form>
Any help is appreciated.