Welcome Guest, Not a member yet? Register   Sign In
check value in $_POST variable
#4

[eluser]BrianDHall[/eluser]
Phil's code got eaten by the code system. Between the calls to $this->input and $this->session there should be a colon (Smile.

So: 'name' => $this->input->post('name') != '' ? $this->input->post('name') : $this->session->userdata('name')


I actually didn't know ternary syntax could be used in an array definition like this, which is a pretty cool.


Messages In This Thread
check value in $_POST variable - by El Forum - 10-02-2009, 04:45 AM
check value in $_POST variable - by El Forum - 10-02-2009, 05:36 AM
check value in $_POST variable - by El Forum - 10-02-2009, 08:21 PM
check value in $_POST variable - by El Forum - 10-02-2009, 08:55 PM
check value in $_POST variable - by El Forum - 10-02-2009, 10:08 PM
check value in $_POST variable - by El Forum - 10-03-2009, 12:07 AM



Theme © iAndrew 2016 - Forum software by © MyBB