Welcome Guest, Not a member yet? Register   Sign In
What is the difference in the codes?(security)
#1

[eluser]SaSa[/eluser]
hello
What is the difference in the codes?Which is more security?
First code:
Code:
$title = $this->input->post('title', TRUE);
              $ural = $this->input->post('ural', TRUE);
              $page_linkus = $this->input->post('page_linkus', TRUE);
              $exposition = $this->input->post('exposition', TRUE);
    $sql = "INSERT INTO links (title, ural, page_linkus, exposition)
VALUES (".$this->db->escape($title).", ".$this->db->escape($ural).", ".$this->db->escape($page_linkus).", ".$this->db->escape($exposition).")";
$this->db->query($sql);
echo $this->db->affected_rows();

Second code:
Code:
$data = array(
'title' => $title,
'name' => $name,
'date' => $date
);
$this->db->insert('mytable', $data);

Third cod:
Code:
$insert = array(
              'title'=>$this->input->post('title', TRUE),
              'ural'=>$this->input->post('ural', TRUE),
              'page_linkus'=>$this->input->post('page_linkus', TRUE),
              'exposition'=>$this->input->post('exposition', TRUE),
            );
    $this->db->insert('links',$insert);
    }


Messages In This Thread
What is the difference in the codes?(security) - by El Forum - 12-01-2010, 06:09 AM
What is the difference in the codes?(security) - by El Forum - 12-01-2010, 06:24 AM
What is the difference in the codes?(security) - by El Forum - 12-01-2010, 06:45 AM
What is the difference in the codes?(security) - by El Forum - 12-01-2010, 07:23 AM
What is the difference in the codes?(security) - by El Forum - 12-01-2010, 07:26 AM
What is the difference in the codes?(security) - by El Forum - 12-01-2010, 07:44 AM
What is the difference in the codes?(security) - by El Forum - 12-01-2010, 10:26 PM
What is the difference in the codes?(security) - by El Forum - 12-01-2010, 10:59 PM
What is the difference in the codes?(security) - by El Forum - 12-02-2010, 08:36 AM



Theme © iAndrew 2016 - Forum software by © MyBB