i have a problem with file upload.when i try to upload a file the following messege came.
Quote:
Notice: Undefined index: userfile in C:\Program Files\xampp\htdocs\file_uploader.php on line 28
Notice: Undefined index: userfile in C:\Program Files\xampp\htdocs\file_uploader.php on line 29
Notice: Undefined index: userfile in C:\Program Files\xampp\htdocs\file_uploader.php on line 30
Notice: Undefined index: userfile in C:\Program Files\xampp\htdocs\file_uploader.php on line 31
|
where line 28,29,30,31 contain following code
Code:
$userfile_name=$_FILES['userfile']['name'];
$userfile_tmp_name=$_FILES['userfile']['tmp_name'];
$userfile_size=$_FILES['userfile']['size'];
$userfile_type=$_FILES['userfile']['type']
and my submitform look like
Code:
<?php
function upload_form() {
?>
<h3>File Upload:</h3>
Select a file to upload: <br />
<form action="<? echo $_SERVER['PHP_SELF']?>" method="POST" enctype="multipart /form-data">
<input type="file" name="userfile" id="userfile">
<input type="submit" name="action" value="upload">
</form>
<?
}
i m going crazy with this.
so plz plz some one help me.
i will be greatful to u.