Okay so this is what I'm trying, basically for the
purposes of posting a news article I want to be able
to upload supporting text files with the content of
the article. Here's what I've got so far... I think
I've totally missed the mark or understood the
documentation in the manual on this... Someone please
set me straight:
<?php
/*Some loops will be added to this after variables
from the previous page. This is why this has been
printed into PHP format.*/
print("<form action=\"process_form.php\"
method=\"post\" enctype=\"multipart/form-data\">");
print("First File: <input name=\"userfile[0]\"
type=\"file\"><br>");
print("Second File: <input name=\"userfile[1]\"
type=\"file\"><br>");
print("<input type=\"submit\" value=\"Upload
Files\">");
print("</form>");
?>
This is the catch file...:
<?php
if
(is_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'][0]))
{
copy($HTTP_POST_FILES['userfile']['tmp_name'][0],
"articles/placetogo");
copy($HTTP_POST_FILES['userfile']['tmp_name'][1],
"articles/placetogo");
print("Files Loaded Successfully!");
} else {
print("Unable to Load Files");
}
?>
Any help is appreciated. Sorry if the formatting on
this came out strange.
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php