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 8564259
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T17:09:26+00:00 2026-06-11T17:09:26+00:00

My issue with the below code is the if(if(empty($fields[‘Remuse’]))) statement everything else works fine.

  • 0

My issue with the below code is the if(if(empty($fields['Remuse']))) statement everything else works fine. I only put it in an if statement to make the warning that it was empty go away now it does not copy when there is a file – Shows in cache and db fine why?

Issue:

  $candidateuploaddir = _MYSITEDIR . '/downloads/refocus_candidates/';
        $candiatefilename = $fields['RenamedResume'];
        $candidatefile = $candidateuploaddir . $candiatefilename;

        if(empty($fields['Remuse']))
        {
                echo 'null';
        }else{
        copy($fields['Resume'],$candiatefilename);
        }

Upload Function:

function uploadResume()
{
    if (!isset($_FILES['UploadResume'])) return false;
    $uploaddir = _CACHEDIR.'/resumes/';
    /* create the upload folder if it does not already exist */
    CMS::RecursiveMkdir($uploaddir);
    $extension = CMS::getFileExtension(basename($_FILES['UploadResume']['name']));
    /* keep producing random filenames until we get a unique one */
    while (empty($filename) || CMS::fileExists($uploaddir.$filename)) {
        $filename = CMS::randomString(10).'.'.$extension;
    }

    $uploadfile = $uploaddir . $filename;

    if (move_uploaded_file($_FILES['UploadResume']['tmp_name'], $uploadfile)){

        return $uploadfile;
        //$uploadfile;
    } else {
        return false;
    }
}

On Submit Line:

$fields['Resume'] = CMS::either(CMS_Plugin_plugin_jobs_apply::uploadResume(), CMS::getFormData('Resume', false)); //upload resume to temporary location
  • 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-11T17:09:28+00:00Added an answer on June 11, 2026 at 5:09 pm

    Is it if(if(empty($fields['Remuse']))) or if(empty($fields['Remuse']))?

    Is it $fields['Remuse'] or $fields['Resume']?


    if (empty($fields['Resume']))
    {
        echo 'null';
    }
    
    else
    {
        copy($fields['Resume'],$candiatefilename);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Issue In the below code , say if i want to change the color
The below code give me a foreach error. What appears to be the issue
Below is code to an inherited ComboBox. The issue is that the ComboBox is
I'm having an issue in IE9 with onbeforeunload -- when the code below is
I am having an issue on mouse hover effect. My code is below and
I have an issue in my JavaScript function. Below is my js code: function
I need to fix a issue for xss vulnerability. the code segment is below.
The code below works in FF, Safari, Chrome. But IE is giving me issues.
I have an issue with this jquery code below. Please give me advice or
I'm having an issue with one of my conditional statements. The code below is

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.