Welcome Guest, Not a member yet? Register   Sign In
Codeigniter multiple checkbox issue STRANGE!
#11

ok, but I cannot solve this issue. There's no documentation helping me solve it. There's no forums or developers that seem to have any idea why its not working. I dont see what options I have.
Reply
#12

Which CI version is this on?
Reply
#13

Hi,

Just out of interest and on latest CI3 I did the following test controller and test view

Controller
PHP Code:
<?php
defined
('BASEPATH') OR exit('No direct script access allowed');

class 
Test extends CI_Controller {
 
 public function 
index()
 {
 
$test_data = array();
 
 
$user_assign $this->input->post('user_assign');
 
$test_data['test_recieved'] = $user_assign;
 
 
$this->load->view('test_view'$test_data);
 }
 


View
PHP Code:
<?php echo form_open('test'); ?>
   <input type="checkbox" name="user_assign[]" value="123">
   <input type="checkbox" name="user_assign[]" value="234">
   <input type="checkbox" name="user_assign[]" value="345">
   <input type="submit" value="send">
</form>

<br />

Test Results: <?php echo print_r($test_recieved); ?>

And I got the expected output:
Code:
Test Results: Array ( [0] => 123 [1] => 234 [2] => 345 ) 1

So, sorry, cannot replicate your problem. Try the tests above and see if you get expected output too.

Paul.
Reply
#14

(01-07-2016, 05:51 AM)Narf Wrote: Which CI version is this on?

Shamefully 1.7.2

But there is a reason for that, its a demo that I need to setup quickly, so I'm using the bare bones of an application that is already setup.

I will obviously use the latest version once and if the app gets the go ahead!
Reply
#15

oh... oh... uhmm... that was before i was born...
Reply
#16

(This post was last modified: 01-07-2016, 07:16 AM by PaulD.)

Release date September 11, 2009 :-o

Just after IE8 was released!

Excuse me while I ROFLMAO

:-)

(No offence intended - at least you were honest about it)
Reply
#17

(01-07-2016, 06:53 AM)frobak Wrote:
(01-07-2016, 05:51 AM)Narf Wrote: Which CI version is this on?

Shamefully 1.7.2

But there is a reason for that, its a demo that I need to setup quickly, so I'm using the bare bones of an application that is already setup.

I will obviously use the latest version once and if the app gets the go ahead!

And you wonder why nobody had an idea why it's not working?
I'm surprised it runs anything at all.

(01-07-2016, 06:57 AM)Avenirer Wrote: oh... oh... uhmm... that was before i was born...

So, you're 5 years old? Smile
Reply
#18

(01-07-2016, 07:19 AM)Narf Wrote:
(01-07-2016, 06:53 AM)frobak Wrote:
(01-07-2016, 05:51 AM)Narf Wrote: Which CI version is this on?

Shamefully 1.7.2

But there is a reason for that, its a demo that I need to setup quickly, so I'm using the bare bones of an application that is already setup.

I will obviously use the latest version once and if the app gets the go ahead!

And you wonder why nobody had an idea why it's not working?
I'm surprised it runs anything at all.

(01-07-2016, 06:57 AM)Avenirer Wrote: oh... oh... uhmm... that was before i was born...

So, you're 5 years old? Smile

I wish... more likely "born in CodeIgniter world"...
Reply
#19

Well I've got 2 clients that have systems built way before I took them over on that version of CI. And they spent a LOT of money developing these systems.

Your comment @Avenirer 'I'm surprised it runs anything at all' concerns me developing systems on CI if they're only going to work for 5 or 6 years
Reply
#20

(01-08-2016, 03:28 AM)frobak Wrote: Well I've got 2 clients that have systems built way before I took them over on that version of CI. And they spent a LOT of money developing these systems.

Your comment @Avenirer 'I'm surprised it runs anything at all' concerns me developing systems on CI if they're only going to work for 5 or 6 years

That wasn't my comment... Smile But, anyway, I think the assertion was not meant to imply that CI won't work for the next 20 years. It will work... if you want to keep old code without changing anything (PHP version come to mind). But a good code is the one that gets updated, not the one that stays the same over more than 5-10 years.

This was the main complaint when a lot of people moved from CodeIgniter: the fact that CodeIgniter tried its best to stay the same for long time in order to not break compatibility.

Now take a look at Laravel. Up until version 5, no versions were compatible between them. Or maybe they were, but you would have to work hard to increment an app from a version to another.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB