[eluser]Roy MJ[/eluser]
Hi i was trying to insert the current date into the database along with other fields and and unexpected error has occurred. The error is as follows :
Code:
A PHP Error was encountered
Severity: Warning
Message: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Calcutta' for '5.5/no DST' instead
Filename: models/mypackages_model.php
Line Number: 48
A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\paul\system\libraries\Exceptions.php:166)
Filename: helpers/url_helper.php
Line Number: 622
My model part is as follows:
Code:
function save($type='', $filename='')
{
switch($type){
case 'Add':
$data = array(
'member_id' => $this->session->userdata('user_id'),
'package_title' => $this->input->post('package_title'),
'price' => $this->input->post('price'),
'product_group'=>$this->input->post('product_group'),
'product_stack'=>$this->input->post('product_id'),
[b]'addeddate' => date('Y-m-d') [/b]
);
if($filename!=''){
$data['imagefile'] = $filename;
}
$this->db->insert('packages', $data);
break;