Guest_imported
New member
- Jan 1, 1970
- 0
Hi. i seem to be having a problem running this script locally. I just installed "Nu Sphere" on my computer, and am having a go at programming PHP. The problem i am having is that $uploadfile_name, $uploadfile_size and $uploadfile_type do not seem to be getting passed through
The code i am using is;
The result is;
Anyone got any ideas?
Thanks
Andy
The code i am using is;
Code:
<?php
echo $uploadfile_name;
if (!$uploadfile) { show_html(); } else { sendmain($uploadfile, $uploadfile_name, $uploadfile_size); }
function show_html() {
?>
<FORM METHOD=GET ACTION="attach.php" ENCTYPE="multipart/form-data">
<INPUT type="FILE" name="uploadfile">
<INPUT TYPE="submit" Value="send file">
</FORM>
<?
} // end the show html part
function sendmain($uploadfile_1, $uploadfile_2, $uploadfile_3) {
echo "The name and path of file is $uploadfile_1<BR>";
echo "The name and path of file is $uploadfile_2 <BR>";
echo "The size of file is $uploadfile_3 <BR>";
}
function error($error) {
echo $error;
exit;
} // end the error sub
?>
The result is;
Code:
The name and path of file is C:\\ha.txt
The name and path of file is
The size of file is
Anyone got any ideas?
Thanks
Andy