hi everyone
i have a problem with uploading two files at the at the same time.
cause the code below tells me that invalid supply argument forach.
[php]
destfile = /pathe/to/directory;
foreach ($_FILES["uploaded"]["error"] as $key => $error)
{
if ($error == UPLOAD_ERR_OK)
{
$tmp_name = $_FILES["uploaded"]["tmp_name"][$key];
$name = $_FILES["uploaded"]["name"][$key];
if(move_uploade d_file($tmp_nam e, $destfile ))
{
echo"copied successfully to:".$destfile. "<br>";
}
else
{
echo"failed to copy the files to:".$destfile. "<br>";
}
}
}[/php]
After so many posts (31) you know that you must include all code within the appripriate code tags. - moderator
i have a problem with uploading two files at the at the same time.
cause the code below tells me that invalid supply argument forach.
[php]
destfile = /pathe/to/directory;
foreach ($_FILES["uploaded"]["error"] as $key => $error)
{
if ($error == UPLOAD_ERR_OK)
{
$tmp_name = $_FILES["uploaded"]["tmp_name"][$key];
$name = $_FILES["uploaded"]["name"][$key];
if(move_uploade d_file($tmp_nam e, $destfile ))
{
echo"copied successfully to:".$destfile. "<br>";
}
else
{
echo"failed to copy the files to:".$destfile. "<br>";
}
}
}[/php]
After so many posts (31) you know that you must include all code within the appripriate code tags. - moderator
Comment