> <?php > if($userfile) { > copy($userfile, '/home/sites/site176/web/makeit/$userfile_name'); > echo "Successfully Added!<br>\n"; > } > ?> > <form action="<?php echo $PHP_SELF ?>" method="post" name="upload"> > File to Upload: <input type=file name=userfile><BR> > <input type=submit value="Upload"> > </form>
Hi Tom Here's some quick comments.. . You need enctype="multipart/form-data" on your form for file uploads . Watch out for max file size being exceeded -- check the php manual on 'Handling file uploads' . If register_globals is off on your server you'd better start looking at using the $_FILES superglobal (check the manual) . use move_uploaded_file(...) rather than copy(...) HTH Rich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php