I really apologize for asking such a simple question but i am stuck in it. Actually my table has three coloumns such as id, status and date. The date field is current timestamp (Also I have selected on update current timestamp in phpmyadmin).
What I want is that date field should be updated on each update but it is not. Here is my code;
if($_POST['status']=="Expired")
{
$_POST['remaining']=0;
}
if($this->db->update('user_package',$_POST,array('upid'=>$_POST['upid'])))
{
redirect('package/view_admin_package_pending');
}
else
{
echo "Hey I could not update the User's requested Package. I am in Package Controller on line number 406";
}
On update the date field updated as 00000000 instead of correct time and date.So, Can any one help me find out the solution.
NOTE: I have also tried doing bellow but did not work;
$_POST['date']=now();
also tried
$_POST['date']=time();