Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
|
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 16th, 2009, 03:17 PM
Registered User
 
Join Date: Apr 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default file upload (problem)

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.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Upload File problem khb3283 ASP.NET 2.0 Basics 1 October 3rd, 2008 01:14 PM
Problem to upload file imjigu2001 ASP.NET 2.0 Professional 2 March 26th, 2008 04:37 AM
File Upload Problem meetravig Pro JSP 0 July 14th, 2007 01:34 AM
File upload Problem, 0 byte!!!! MTLedari ASP.NET 2.0 Basics 6 December 19th, 2006 07:20 AM
File upload problem! Ashleek007 Beginning PHP 0 July 15th, 2005 11:08 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.