Welcome Guest, Not a member yet? Register   Sign In
Is it possible to set post userdata?
#1

[eluser]Mackstar[/eluser]
Which is the best way to do this?

I used to just set $_POST["whatever"]="something";

I don't think this works in CI?

Cheers

Richard
#2

[eluser]pistolPete[/eluser]
You can modify the $_POST array, but why do you want to?
Please explain what you are trying to achieve.
#3

[eluser]Mackstar[/eluser]
I was wanting to tweak parameters for use in searches, for example adding >= and <= for price above and below (these are unusable symbols in CI) so that I can place them straight in a search.

But since you ask I guess you are right, maybe a bad habit I have got myself in...

Much better to parse them through a parsing method or class.

Cheers

Richard
#4

[eluser]xwero[/eluser]
There is no reason why you can't add data to the post global in CI. But as pistolPete suggested it's not needed most of the times.
#5

[eluser]Mackstar[/eluser]
I actually agree, and looking back on it I think I can remember that more often than not it has got me into more trouble.

Cheers

Richard




Theme © iAndrew 2016 - Forum software by © MyBB