Welcome Guest, Not a member yet? Register   Sign In
stupid input problem
#9

[eluser]Pygon[/eluser]
[quote author="xwero" date="1204672681"]
I think that will be even more confusing for new comers. If there would be a check to confirm there are values in the $_POST global posted will be more intuitive
Code:
if($this->input->posted())
{
   echo $this->input->post('yes');
}
[/quote]

I agree and disagree. I don't think it would be terribly confusing although there may be a little confusion (however per my request, more detailed function documentation should handle it well).

My point is really, post() is acting as an accessor, so it would seem logical that the accessor would return TRUE (or the cleaned contents) if it contains data (!empty) and FALSE if it does not (empty), no different than calling empty on the $_POST array. It seems to me that the goal of input is to provide safe access to arrays, so I believe it should also be able to provide a safe array or at the least a boolean status of it.


Messages In This Thread
stupid input problem - by El Forum - 03-04-2008, 07:41 AM
stupid input problem - by El Forum - 03-04-2008, 07:45 AM
stupid input problem - by El Forum - 03-04-2008, 07:52 AM
stupid input problem - by El Forum - 03-04-2008, 09:39 AM
stupid input problem - by El Forum - 03-04-2008, 10:17 AM
stupid input problem - by El Forum - 03-04-2008, 10:44 AM
stupid input problem - by El Forum - 03-04-2008, 11:18 AM
stupid input problem - by El Forum - 03-04-2008, 11:21 AM
stupid input problem - by El Forum - 03-04-2008, 12:25 PM
stupid input problem - by El Forum - 03-04-2008, 12:58 PM
stupid input problem - by El Forum - 03-04-2008, 01:05 PM
stupid input problem - by El Forum - 03-11-2008, 03:07 AM



Theme © iAndrew 2016 - Forum software by © MyBB