Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function addPerson(){
- $username = $this->input->post('username');
- $password = $this->input->post('password');
- $accesslevel = $this->input->post('accesslevel');
- if (strlen($username) < 1)
- {
- $data['myerror'] = "The Username field is required.";
- }
- if(strlen($data['myerror'])==0)
- {
- $this->db->query("INSERT INTO usersas6 "."(compid,username,password,accesslevel) VALUES "."(null,'$username', '$password', '$accesslevel')");
- $this->getAllPerson();
- //are you trying to put it in the view? or this is your model?
- $this->template->show('Admin', $this->TPL);
- }
- if(strlen($data['myerror']) != 0){
- //This line may caused your error, what is this line for?
- $this->TPL["myError"] = $myerror;
- $this->getAllPerson();
- $this->template->show('Admin', $this->TPL);
- }
- }
Add Comment
Please, Sign In to add comment