$data = array(
'date' => $time,
'boxoffice'=> $boxoffice,
'upcoming'=> $upcoming,
'intheaters'=> $intheaters,
'opening' => $opening,
'user' => $users,
'movie' => $movies,
'star' => $actors,
'diractor' => $directores,
'writer' => $writeres,
'cast' => $casts,
'comment'=> $comment,
'image' => $images,
'genre' => $genre,
'country'=> $countrycode
);
try {
$this->db->insert('muvidb_updatehistory',$data);
}
catch (Exception $e){}
I have those codes above in my project, at first it seems working fine but when i looked into my table, the value inserted three times. I’m new in codeigniter and i am stuck with this problem.
Anyone have an idea why is this happening?
Have you checked to see if you have some sort of rewrite trickery or a dev debug tool that would access that URL 3 times? (Or even a referrer search bot, or the like…)
This is why you should probably verify it’s a POST request before inserting data. GET requests that adhere to HTTP specs shouldn’t alter data…