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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:28:52+00:00 2026-06-17T23:28:52+00:00

In consequence from yesterdays post as i was trying to transfer some variables between

  • 0

In consequence from yesterdays post as i was trying to transfer some variables between the controller and the view today I am trying to get data from a form and update the db but am having trouble getting those values.

this is function from the controller which is called from the form of the view

  function updateRecords(){

    $data2=array('name'=>$this->input->post('first_name'),
    'surname'=>$this->input->post('last_name'),
    'contact'=>$this->input->post('contact'),
    'email'=>$this->input->post('email_address'));
            print_r($data2);
     }

when I try to print the data2 array I get: Array ( [name] => [surname] => [contact] => [email] => )

this is the code from the view:

  <fieldset style="text-align:left">
  <legend><h2>Edit Clients Details</h2></legend>
  <?php
  $this->load->helper('form');
  echo form_open('site/updateRecords');
  echo form_input('first_name', $records['0']->name);
  echo form_input('last_name', $records['0']->surname);
  echo form_input('contact', $records['0']->contact);
  echo form_input('email_address', $records['0']->email);
  echo validation_errors('<p class="error">');
  echo anchor('site/updateRecords','Save');
  echo form_close();
  ?>
  </fieldset>

  <p>
  <?php echo anchor('site/add','Add clients');?>&nbsp;
  <?php echo anchor('site/members_area','Go Home')?>&nbsp;
  <?php echo anchor('login/logout', 'Logout'); ?>
  • 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-17T23:28:53+00:00Added an answer on June 17, 2026 at 11:28 pm

    There are a couple of ways to have the id be accessible. One is to structure the edit page call so that it has the id in it. Normally I do this by setting up my urls to be something like: http://site.com/client/client_id/edit for the edit page. Alternately, you can stash the record’s id in a hidden form field when you call the form up and then pass it back as part of the post.

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

Sidebar

Related Questions

I've got a little issue about validating PHP variables from a form. For example:
I've been exploring BDD/DDD and as a consequence trying to come up with a
I have a TCP socket client receiving messages (data) from a server. messages are
From this wikipedia page: The fundamental difference between context-free grammars and parsing expression grammars
From C++ Primer, 5th Edition, page 407: All static duration variables share the following
I get that C++ 11 has introduced the new move semantics and as consequence
I'm pretty stuck on this anonymous type from LINQ business. It's a consequence of
My main MainWindow.xaml.cs has a lot of Task variables and as a consequence a
As a consequence of a legal settlement with Sun regarding the Java technology, Microsoft
Here's the scenario: Process 1 (P1) - reads in various flat files one consequence

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.