• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[solved]$this->input->post() not working?

Hi all,

My post function I seem to remember was working yesterday but for some reason it does not appear to work now after doing work on my View (CSS etc).

pic—> http://i.imgur.com/lpOqB.jpg

This is the code here which finds the last row entered by user which is found in my controller.

The problem is that it is giving back an error messages saying that all the rows are required when it should only be up to whatever the user enters.

e.g. the user completes 4/20 rows and forgets to enter a name in the “event” field in row number 4 then it would say “Name field in row 4 is required”.

However now it is saying they are all required? :S
//counter starts at zero which matches the field names that start at zero

//finds the last time field by the user which will be assumed as the last row.
                       //if time field has been unchanged then it is assumed user did not use it
                        if( $this->input->post('time'.$completedeventrows) == '00:00:00')
                            break; //
                        $test =$this->input->post('time'.$completedeventrows);
                        echo $test;
                while ($completedeventrows <= $totaleventsrows);
-I have checked spelling;
&lt;input name="time0" value="00:00:00" maxlength="8" size="6"&gt;

Spelling is fine and it matches up at other side.

-I have tried checking to see if another input field has been unchanged and it works.

-When I try echoing a assigning a test variable from the post and then echoing it as I have shown above it does not echo anything. This is really strange.

I have a suspicion that its my View heres the pastebin:


I have made a workaround for it at the moment which is just checking the “event” field instead of time but why is that working and not the other.

Messages In This Thread
[solved]$this->input->post() not working? - by El Forum - 07-17-2011, 09:49 AM
[solved]$this->input->post() not working? - by El Forum - 07-17-2011, 10:43 AM
[solved]$this->input->post() not working? - by El Forum - 07-17-2011, 08:14 PM
[solved]$this->input->post() not working? - by El Forum - 07-18-2011, 03:25 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.