Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8568701
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:10:10+00:00 2026-06-11T18:10:10+00:00

I have written a form which has 3 text inputs and one file input.

  • 0

I have written a form which has 3 text inputs and one file input.
This form posts to a PHP script, which saves the file, as well as performing some other business logic. The program worked well in my localhost, and even on my server.

The program is now embedded in a Facebook application, where it still works- but the uploaded files were not saving, initally; So I changed the uploads directory permissions to 777 (a broad stroke, I know). Now the uploaded files are being saved as a string of numbers “13474022561” with no extension.

Can anyone tell me why? Or how to fix this?

snippet of source code below:

  if($_FILES['resume']['type']!='')
  {
        $target_path = "resumes/";

        $target_path = $target_path .time().basename( $_FILES['resume']['name']!="");
        if($_FILES['resume']['type']=="application/vnd.openxmlformats-officedocument.wordprocessingml.document" || $_FILES['resume']['type']=="application/pdf")
        {
            if(move_uploaded_file($_FILES['resume']['tmp_name'], $target_path)) 
            {
                echo "success";
            }
            else
                echo "failure";
        }
        else 
        {
                echo "<center>Resume must be MS DOC or PDF <br/>";                    
                exit;
        }
  }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T18:10:11+00:00Added an answer on June 11, 2026 at 6:10 pm

    This line of code:

    $target_path = $target_path .time().basename( $_FILES['resume']['name']!="");
    

    Should be:

    $target_path = $target_path . time() . basename( $_FILES['resume']['name']);
    

    Your current code is evaluated like this:

    $target_path = 'resumes/' . time() . basename(true);
    

    Which is probably not what you want.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written a simple CRUD form which has one select list. However the
I have a page which has a small form with one input field and
I'm sure i've badly written this. I have a simple form which you enters
I have written a login form, in this I have used, form and method
I have this AJAX submission form written with the jQuery validation plugin. It all
I am working on a simple contact form written in php and have almost
I have two window form applications written in C, one holds a struct consisting
I have a mechanize script written in python that fills out a web form
I have a form which spawns from an excel add-in written with VSTO. I
I have written a web part in C# for Sharepoint 2007 which has a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.