mcn codeigniter walin hadapu site ekak host kara host karala form ekakin data danna hadanakota mehema error ekak enawa
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: status
Filename: models/Model_insert.php
Line Number: 55
Backtrace:
File: /home/dgicabse/public_html/application/models/Model_insert.php
Line: 55
Function: _error_handler
File: /home/dgicabse/public_html/application/controllers/Insert.php
Line: 143
Function: insertbooking
File: /home/dgicabse/public_html/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: status
Filename: models/Model_insert.php
Line Number: 55
Backtrace:
File: /home/dgicabse/public_html/application/models/Model_insert.php
Line: 55
Function: _error_handler
File: /home/dgicabse/public_html/application/controllers/Insert.php
Line: 143
Function: insertbooking
File: /home/dgicabse/public_html/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: status
Filename: models/Model_insert.php
Line Number: 55
Backtrace:
File: /home/dgicabse/public_html/application/models/Model_insert.php
Line: 55
Function: _error_handler
File: /home/dgicabse/public_html/application/controllers/Insert.php
Line: 143
Function: insertbooking
File: /home/dgicabse/public_html/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at /home/dgicabse/public_html/system/core/Exceptions.php:271)
Filename: helpers/url_helper.php
Line Number: 564
Backtrace:
File: /home/dgicabse/public_html/application/controllers/Insert.php
Line: 144
Function: redirect
File: /home/dgicabse/public_html/index.php
Line: 315
Function: require_once
me thiyenne eke code eka
meka localhost eke awulak nathuwa run wenawa bn ayi server eke me awula enne


A PHP Error was encountered
Severity: Notice
Message: Undefined variable: status
Filename: models/Model_insert.php
Line Number: 55
Backtrace:
File: /home/dgicabse/public_html/application/models/Model_insert.php
Line: 55
Function: _error_handler
File: /home/dgicabse/public_html/application/controllers/Insert.php
Line: 143
Function: insertbooking
File: /home/dgicabse/public_html/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: status
Filename: models/Model_insert.php
Line Number: 55
Backtrace:
File: /home/dgicabse/public_html/application/models/Model_insert.php
Line: 55
Function: _error_handler
File: /home/dgicabse/public_html/application/controllers/Insert.php
Line: 143
Function: insertbooking
File: /home/dgicabse/public_html/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: status
Filename: models/Model_insert.php
Line Number: 55
Backtrace:
File: /home/dgicabse/public_html/application/models/Model_insert.php
Line: 55
Function: _error_handler
File: /home/dgicabse/public_html/application/controllers/Insert.php
Line: 143
Function: insertbooking
File: /home/dgicabse/public_html/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at /home/dgicabse/public_html/system/core/Exceptions.php:271)
Filename: helpers/url_helper.php
Line Number: 564
Backtrace:
File: /home/dgicabse/public_html/application/controllers/Insert.php
Line: 144
Function: redirect
File: /home/dgicabse/public_html/index.php
Line: 315
Function: require_once
me thiyenne eke code eka
PHP:
public function insertbooking($data)
{
$this->db->where('vehical_number',$data['vehical_number']);
$respond = $this->db->get('ongoing_booking');
if($respond->num_rows()>0){
foreach ($respond->result() as $row)
{
$enddate= $row->end_date;
$bookingtime= $row->booking_time;
$bookingdate=$row->booking_date;
if(($enddate>$data['booking_date']) && ($bookingdate<$data['booking_date']))
{
$status='not';
}
else if (($enddate==$data['booking_date'])){
if($bookingtime>$data['booking_time']){
$status='not';
}
}
else if (($bookingdate==$data['booking_date'])){
if($bookingtime<=$data['booking_time']){
$status='not';
}
}
if($status=='not')
{
$this->session->set_flashdata('error','This Vehical Already booking');
redirect(base_url()."Admin/newbooking");
}
else{
$this->db->insert("ongoing_booking",$data);
}
}
}
else{
$this->db->insert("ongoing_booking",$data);
}
}
meka localhost eke awulak nathuwa run wenawa bn ayi server eke me awula enne


