Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Jan 2009
    Location
    nagpur
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    help in uploading file

    Please help me.
    I'm facing the problem in php5.2 while uploading the file here is the error

    Notice: Undefined index: resume in C:\wamp\www\frames\contact validation\upload_file.php on

    same script is executing in php4.4

    here is the script for uploading


    if($_FILES['resume'])
    {
    if($_FILES['resume']['size'] < 90000)
    {
    if($_FILES["resume"]["error"] > 0)
    {
    echo "Erroe Code : ".$_FILES["resume"]["error"];
    }
    else
    {
    /*echo "<br><b>file name : </b>" . $_FILES["resume"]["name"];
    echo "<br><b>File Type : </b>" . $_FILES["resume"]["type"];
    echo "<br><b>File Size : </b>" . $_FILES["resume"]["size"];*/

    move_uploaded_file($_FILES["resume"]["tmp_name"], "./upload/".$_FILES["resume"]["name"]);
    /*{
    echo "<br>File Uploaded <a href ='./upload/".$_FILES["resume"]["name"]."'>".$_FILES["resume"]["name"]."</a>";
    }*/

    }
    }
    }

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,849
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Try
    PHP Code:
    if(isset($_FILES['resume'])) 
    instead of
    PHP Code:
    if($_FILES['resume']) 
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    New to the CF scene
    Join Date
    Jan 2009
    Location
    nagpur
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I tried this but it is not working

  • #4
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,011
    Thanks
    2
    Thanked 312 Times in 304 Posts
    What does a phpinfo(); statement show for the file_uploads setting?

    And what does the following show -

    PHP Code:
    echo "<pre>";
    echo 
    "POST:";
    print_r($_POST);
    echo 
    "FILES:";
    print_r($_FILES);
    echo 
    "</pre>"
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.

  • #5
    New to the CF scene
    Join Date
    Jan 2009
    Location
    nagpur
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    it displaing
    Array()
    only and not the values


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •