Hello i have restaurant webapp and after i install it all things work there just the openregister thing no ... here is the webapp login details:
user:admin
pass:password
pos.php code
public function openregister($id = 0, $userRole)
{
if ($_POST) {
$cash = $this->input->post('cash');
$id = $this->input->post('store');
$waitersCach = $this->input->post('waitersCach');
$waitercc = '';
foreach ($waitersCach as $key => $value) {
$waitercc .= $value ? $key.','.$value.',' : '';
}
$data = array(
"status" => 1,
"user_id" => $this->session->userdata('user_id'),
"cash_inhand" => $cash,
"waiterscih" => $waitercc,
"store_id" => $id
);
$register = Register::create($data);
$store = Store::find($id);
$store->status = 1;
$store->save();
$CI = & get_instance();
$CI->session->set_userdata('register', $register->id);
$CI->session->set_userdata('store', $id);
redirect("", "location");
}
$open_reg = Register::find('first', array(
'conditions' => array(
'store_id = ? AND status= ?',
$id,
1
)
));
$CI = & get_instance();
$CI->session->set_userdata('register', $open_reg->id);
$CI->session->set_userdata('store', $id);
if($userRole === 'kitchen') {
redirect("kitchens", "location");
}else {
redirect("", "location");
}
}
I tryed findin the error,all things work there just that blank page that i actually dont know why it isnt working i hope somone can find the issue, thank you verymuch