0

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

nooo
  • 81
  • 1
  • 1
  • 8
  • You need to give us some error codes or a more detailed description of your problem. It is very hard to determine the problem with a vague question and 800 lines of code :) Check the error_log or smth – Anders Jun 25 '20 at 12:53
  • 1
    https://stackoverflow.com/questions/845021/how-can-i-get-useful-error-messages-in-php – CBroe Jun 25 '20 at 12:55
  • I updated my question thank u for ur advice... so i think the error is in openregister code... bcuz there i receive a blank page so... it must be there.. so please know u can check or log into web app – nooo Jun 25 '20 at 12:58
  • ? Do u know where is the problem – nooo Jun 25 '20 at 13:14
  • nobody there that can help me with this issue? – nooo Jun 25 '20 at 14:20
  • Still nobody has reply here ??? – nooo Jul 04 '20 at 17:58

0 Answers0