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><inpu t type="file" name="newfile" size="25"></td></tr>
<tr><td><inpu t 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_P OST_FILES);
echo "Uploading: ";
echo $HTTP_POST_FILE S['newfile']['name'];
$file=strtolowe r($HTTP_POST_FI LES['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
use it - but it does not work when I do it like this in PHP4.
<table>
<tr><td><inpu t type="file" name="newfile" size="25"></td></tr>
<tr><td><inpu t 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_P OST_FILES);
echo "Uploading: ";
echo $HTTP_POST_FILE S['newfile']['name'];
$file=strtolowe r($HTTP_POST_FI LES['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
Comment