Home
Forums
Members
Search
Help
New topics
Todays topics
Website
Welcome Guest, Not a member yet?
Register
Sign In
Login
Username:
Password:
Remember me
Lost Password?
CodeIgniter Forums
Archived Discussions
Archived Development & Programming
Why NOT use $_POST directly?
Pages (2):
1
2
Next »
Share on Google
Share on Facebook
Share on Twitter
View a Printable Version
Subscribe to this thread
Add Poll to this thread
Send thread to a friend
Linear Mode
Threaded Mode
Why NOT use $_POST directly?
El Forum
Guest
#1
06-17-2011, 09:25 AM
[eluser]RJ[/eluser]
The CI way is to grab post params through the input class $this->input->post(). I ask you, why not simply use $_POST?
Thanks
El Forum
Guest
#2
06-17-2011, 09:39 AM
[eluser]osci[/eluser]
$this->input->post() calls _fetch_from_array which checks for $xss_clean === TRUE and uses security class if needed.
You can always use $_POST but you would have to do this stuff yourself.
El Forum
Guest
#3
06-17-2011, 09:55 AM
[eluser]RJ[/eluser]
That's what I thought. Thanks @
osci
El Forum
Guest
#4
06-20-2011, 10:22 PM
[eluser]Aken[/eluser]
It also will default to an empty string if that particular $_POST variable doesn't exist, which can be handy (but don't be lazy when you code, mkay).
El Forum
Guest
#5
06-20-2011, 11:08 PM
[eluser]theprodigy[/eluser]
I believe it defaults to the boolean FALSE, not an empty string.
El Forum
Guest
#6
06-20-2011, 11:46 PM
[eluser]InsiteFX[/eluser]
@theprodigy, Correct!
InsiteFX
El Forum
Guest
#7
06-20-2011, 11:51 PM
[eluser]theprodigy[/eluser]
YAY!! What did I win?? :-D
El Forum
Guest
#8
06-20-2011, 11:59 PM
[eluser]InsiteFX[/eluser]
A BOOLEAN TRUE LOL!
El Forum
Guest
#9
06-21-2011, 12:00 AM
[eluser]theprodigy[/eluser]
lol
El Forum
Guest
#10
06-21-2011, 12:14 AM
[eluser]Aken[/eluser]
Drat, you're right. I haven't dealt with any non-required POST fields in a while, haha. My mistake.
Pages (2):
1
2
Next »
--------------------
Private Messages
User Control Panel
Who's Online
Search
Forum Home
General
-- News & Discussion
-- Events
-- Lounge
-- Regional User Groups
Using CodeIgniter
-- Installation & Setup
-- Model-View-Controller
-- Libraries & Helpers
-- Best Practices
-- Choosing CodeIgniter
-- General Help
CodeIgniter 4
-- CodeIgniter 4 Roadmap
-- CodeIgniter 4 Development
-- CodeIgniter 4 Feature Requests
-- CodeIgniter 4 Support
-- CodeIgniter 4 Discussion
-- CodeIgniter 4 Addins
Development
-- CodeIgniter 3.x
-- CodeIgniter 2.x
-- Issues
-- NetBeans Plugin
External Resources
-- Spotlight
-- Learn More
-- Jobs
-- Addins
Archived Discussions
-- Archived Libraries & Helpers
-- Archived Development & Programming
Theme © iAndrew 2016 -
Forum software by © MyBB