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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:19:11+00:00 2026-05-27T11:19:11+00:00

I have a codeigniter app and everytime you go to the page, it says

  • 0

I have a codeigniter app and everytime you go to the page, it says you did not select a file to upload. I’m using the same codeigniter function for the page display as the file handle upload.

I’m using ajax to submit the form so I can’t check the $_SERVER[‘REQUEST_METHOD’]

Here’s a snippet of my function:

if(!$this->upload->do_upload('userFile')) { // if there are errors uploading the file of if it's the first time on the page…

    $content_data['album'] = $album;

    echo "post go through?";

    // if the $_POST array is not empty display the error. That means that someone submitted the form without choosing a file
    //if(isset($_POST['submit']))  {
        $content_data['error'] = array('error' => $this->upload->display_errors());
    //}

    $content_data['data'] = array('upload_data'=>$this->upload->data());
    $data['sess'] = $this->session;
    $data['content'] = $this->load->view('member/addPhoto', $content_data, true);
    $this->load->view('template/admin', $data);
} else { // else there were no errors and we can resize and upload.

}
  • 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-05-27T11:19:12+00:00Added an answer on May 27, 2026 at 11:19 am

    You can check whether it is submitted or not before doing the above operation

    if ($this->input->post('userFile'))
    {
     // Your code
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using CodeIgniter (a PHP framework) to build an app, and I have an
I have this function on my controller (Im using CodeIgniter) that reads the database,
I have a validation function I'm using inside of codeigniter. function valid_image() { if
I have an Codeigniter app (using version 2.1.0) that is writing a transaction to
I'm building my first CodeIgniter app - and have a registration form. I'm using
I am using codeigniter, I have URL like this ( http://localhost/en/home/submit ). My App
We have a popular web-app developed using CodeIgniter. Now we want to expose our
I'm working on an app in CodeIgniter, and I want to have admin pages
I have been using the CodeIgniter system for a while now - but it
I am using Codeigniter framework and I have a form with input fields. When

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.