Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
fileupload.html
[syntax="html"]<html>
<body>
<form name="frmname"action="upload.php" method="post">
upload your file:<input type="file" name="file"><br>
<input type="submit" name="submit" value="submit">
</form>
</body>
</html>upload.php[/syntax]
Code: Select all
<?php
if ($_FILES["file"]["error"] > 0)
{
echo "Error:". $_FILES["file"]["error"] ."<br>";
}
else
{
echo "upload:". $_FILES["file"]["name"] ."<br>";
echo "type:". $_FILES["file"]["type"] ."<br>";
echo "size:". ($_FILES["file"]["size"]/1024) ."kb<br>";
echo "stored in:". $_FILES["file"]["tmp_name"] ."<br>";
}
?>Notice: Undefined index: file in c:\easyphp1-8\www\upload.php on line 2
Notice: Undefined index: file in c:\easyphp1-8\www\upload.php on line 8
upload:
Notice: Undefined index: file in c:\easyphp1-8\www\upload.php on line 9
type:
Notice: Undefined index: file in c:\easyphp1-8\www\upload.php on line 10
size:0kb
Notice: Undefined index: file in c:\easyphp1-8\www\upload.php on line 11
stored in:
how to reslove this problem..thanks in advance..
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]