Welcome Guest, Not a member yet? Register   Sign In
Redundant or Safer?
#6

[eluser]JoostV[/eluser]
If you use
Code:
$this->validation->whatever_input_name_from_my_form_here;
The values will also be affected by validation rules you specify, such as trim|htmlspecialchars|xss_clean
This gives you more control over sanitizing input.

However, if you're going to use input, it's
Code:
$this->input->post('whatever_input_name_from_my_form_here');
instead of
Code:
$this->input->('whatever_input_name_from_my_form_here');

Finally, even if CI sanitizes a lot of your input, you should still always sanitize input. For instance, if you execute
Code:
$this->db->where('id', $id);
$this->db->delete('mytable');
and $id is empty by mistake, you will delete all records from your table.


Messages In This Thread
Redundant or Safer? - by El Forum - 10-17-2008, 08:56 AM
Redundant or Safer? - by El Forum - 10-17-2008, 11:13 AM
Redundant or Safer? - by El Forum - 10-17-2008, 11:54 AM
Redundant or Safer? - by El Forum - 10-17-2008, 12:42 PM
Redundant or Safer? - by El Forum - 10-17-2008, 12:45 PM
Redundant or Safer? - by El Forum - 10-17-2008, 01:16 PM
Redundant or Safer? - by El Forum - 10-17-2008, 02:29 PM



Theme © iAndrew 2016 - Forum software by © MyBB