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

  • Home
  • SEARCH
  • 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 8378769
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:00:23+00:00 2026-06-09T16:00:23+00:00

It is my first time to use codeigniter in building my school project. Let

  • 0

It is my first time to use codeigniter in building my school project.

Let me go straight.

I can get my POST request except for the form_upload();

This is my sample FORM:

<?php
echo form_open('admin/test_upload');
    echo form_input(array('name' => 'title'));?><br/><?
    echo form_upload(array('name' => 'file'));
    echo form_submit(array('name' => 'submit', 'value' => 'submit'));
echo form_close();
?>

This is my CONTROLLER:

function test_upload(){
    $data['header'] = "TEST UPLOAD";
    var_dump($_POST) ; //basically, this is function echoes back the post array.
    $this->load->view('admin/dashboard_view', $data);
}

This is the Output

array(2) {
["title"]=>
string(3) "asd"
["submit"]=>
string(6) "submit"
}

//The ["file"] is missing.... wHAT!?>

Can someone help me out?

  • 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-09T16:00:24+00:00Added an answer on June 9, 2026 at 4:00 pm

    File uploads need to have an enctype="multipart/form-data" in their form tag, so you should be using this to open the form:

    echo form_open_multipart('admin/test_upload');
    

    Also, as the others have mentioned, the uploaded files will be in $_FILES instead of $_POST.

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

Sidebar

Related Questions

This is the first time I use mod_rewrite and I can't get it to
I am using HMVC codeigniter. I am trying to use jquery ajax first time.
First time I've come to use collection_select in a project and I've hit a
It's the first time I use Subsonic. Let say I have those classes :
This is my first time to use SharpPcap library. I created new project with
first time use JTree. Just wondering is it possible to have more than one
Its my first time to use web service in iOS. REST was my first
For the first time i use eclipse with m2e and i want to configure
I have some problem with this mongoid. It's my first time to use mongoDB,
This is my first time that I use WCF and Android. So, sorry for

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.