Welcome Guest, Not a member yet? Register   Sign In
Form post to DB with safe inputs
#1

[eluser]RaZoR LeGaCy[/eluser]
I am unsure as how to properly make form variables safe to input into databases

How can I make this data safe to insert into the DB
Code:
$data = array(
               'rid' => ''.$_POST['rid'].'' ,
               'cat' => ''.$_POST['cat'].'' ,
               'c_author' => ''.$_POST['c_author'].'' ,
               'comment' => ''.$_POST['comment'].'' ,
               'c_score' => ''.$_POST['c_score'].'' ,
               'time' => ''.$_POST['time'].'' ,
               'ip' => ''.$_POST['ip'].''
            );

$this->db->insert('hellhorror_reviews_comments', $data);


redirect('movies/comments/'.$_POST['rid'].'/');

Thanx everyone,
I always get confused with this part.


Messages In This Thread
Form post to DB with safe inputs - by El Forum - 07-16-2007, 09:00 PM
Form post to DB with safe inputs - by El Forum - 07-16-2007, 11:31 PM
Form post to DB with safe inputs - by El Forum - 07-17-2007, 12:31 AM
Form post to DB with safe inputs - by El Forum - 07-21-2007, 08:25 PM
Form post to DB with safe inputs - by El Forum - 07-22-2007, 05:16 AM
Form post to DB with safe inputs - by El Forum - 07-22-2007, 01:52 PM
Form post to DB with safe inputs - by El Forum - 07-22-2007, 05:15 PM
Form post to DB with safe inputs - by El Forum - 07-22-2007, 07:18 PM
Form post to DB with safe inputs - by El Forum - 07-22-2007, 10:12 PM



Theme © iAndrew 2016 - Forum software by © MyBB