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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T17:05:02+00:00 2026-05-15T17:05:02+00:00

I am brand new to Code Igniter but I can’t seem to find a

  • 0

I am brand new to Code Igniter but I can’t seem to find a way to do this in the documentation,
In normal PHP you can retrieve the contents of the entire POST variable like this

$_POST = $postedVars

But I can’t seem to find something that does this in the same manner, I’ve tried

$arr = $this->input->post;

and

$arr = $this->input->post();

With no luck! Is this possible in CI? Thanks in advance!

  • 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-15T17:05:03+00:00Added an answer on May 15, 2026 at 5:05 pm

    First, you need a form or something that sets the variables
    Then, you retrieve them.

    $this->input->post(‘first_name’).

    You are missing the name of the variable!

    The signup form:

    echo form_open('CHome/signup');
    $data=array('name'=>'first_name', 'id'=>'first_name','size'=>40,'value'=>set_value('first_name'));
    echo "<p><label for='first_name'>First Name </label>";
    echo form_input($data);
    echo form_submit('submit','Make Account');
    

    The Model:

     function addUser(){
        //you should use $this->input->post('first_name')
                $data=array(
                    'first_name'=>db_clean(ucfirst($_POST['first_name'])), //db_clean is a custom func
                    'last_name'=>db_clean(ucfirst($_POST['last_name'])),        
                    'email'=>db_clean($_POST['email']),            
                    'username'=>db_clean($_POST['username']),
                    'password'=>db_clean(sha1($_POST['password1'])),            
                    'type'=>db_clean('user'),
                );
    
                $this->db->insert('users',$data);
            }
    

    Codeigniter stores sessions in cookies, it’s all weird.
    I suggest just using PHP’s native sessions, such as $_SESSION[‘first_name’]. Make sure to write “session_start();” in your controller/model so you can use sessions!! (usually do it in the constructor)

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

Sidebar

Related Questions

I'm brand new to python, and need some help understanding this code fragment: for
I need to integrate my no-framework code with my brand new Zend Application. But
I'm brand new to Doctrine and Code Igniter and I'm running into a problem
I am brand new to Java and was given this piece of code, no
Brand new to Python (and programming in general), if this is simple and/or answered
I'm brand new to node.js, but I wanted to play around with some basic
Brand new to android and facing a weird problem.Check out the code below FirstActivity.java:
Recently I've begun to code in Objective-C for iOS 5 devices. My brand new
The brand-new WCF-based code needs (in the meanwhile) to provide a service to a
brand new on this forum and this is my first post! At work we're

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.