CodeIgniter Forums
$this->input->post($data, TRUE) vs ...xss_clean($data) - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: $this->input->post($data, TRUE) vs ...xss_clean($data) (/showthread.php?tid=41687)



$this->input->post($data, TRUE) vs ...xss_clean($data) - El Forum - 05-14-2011

[eluser]veledrom[/eluser]
Hi,

I just wonder if there is any difference between codes below because, if them two do the same work then there is no point for me to use both at same time. Am I right?

Thanks

Code:
$this->input->post($data, TRUE);
Code:
$this->security->xss_clean($data);



$this->input->post($data, TRUE) vs ...xss_clean($data) - El Forum - 05-14-2011

[eluser]Eric Barnes[/eluser]
Yes they do the same. So if you are reading post data use the first.


$this->input->post($data, TRUE) vs ...xss_clean($data) - El Forum - 05-14-2011

[eluser]veledrom[/eluser]
Thank you.