Welcome Guest, Not a member yet? Register   Sign In
Test multiple POST's with OR operator
#5

[eluser]porquero[/eluser]
maybe you should use a foreach:

Code:
$post_data = array('postcode', 'number', 'address1', 'address2', 'address3');
$result = false;

foreach($post_data as $input){
$result = $result || $this->input->post($input);
}

if ($result == true){}


Messages In This Thread
Test multiple POST's with OR operator - by El Forum - 03-29-2012, 06:01 AM
Test multiple POST's with OR operator - by El Forum - 03-29-2012, 06:21 AM
Test multiple POST's with OR operator - by El Forum - 03-29-2012, 06:46 AM
Test multiple POST's with OR operator - by El Forum - 03-29-2012, 09:44 AM
Test multiple POST's with OR operator - by El Forum - 03-29-2012, 11:50 AM



Theme © iAndrew 2016 - Forum software by © MyBB