[eluser]Gurrewe[/eluser]
Hello!
My error:
Code:
Fatal error: Class 'Model' not found in /home/a5860660/public_html/granden/application/models/auth_model.php on line 3
models/auth_model.php:
Code:
<?php
class Auth_model extends Model {
function validate()
{
$this->db->where('username', $this->input->post('username'));
$this->db->where('password', $this->input->post('password'));
$query = $this->db->get('users');
if($query->num_rows == 1)
{
return true;
}
}
function create_member()
{
$birthday_array = array($this->input->post('birth_year'),$this->input->post('birth_month'),$this->input->post('birth_day'));
$birthday = implode(",",$birthday_array);
$new_member_insert_data = array(
'username' => $this->input->post('username'),
'password' => $this->input->post('password'),
'city' => $this->input->post('city'),
'email' => $this->input->post('email'),
'name_first' => $this->input->post('name_first'),
'name_last' => $this->input->post('name_last'),
'birth' => $birthday
);
$this->form_validation->set_rules('name_first', 'Name', 'trim|required');
$this->form_validation->set_rules('name_last', 'Last Name', 'trim|required');
$this->form_validation->set_rules('city', 'Stad', 'trim|required');
$this->form_validation->set_rules('email', 'Email Address', 'trim|required|valid_email');
$this->form_validation->set_rules('birth_year', 'Födelse år', 'trim|required|min_length[4]|max_length[4]');
$this->form_validation->set_rules('birth_month', 'Födelse månad', 'trim|required|min_length[2]|max_length[2]');
$this->form_validation->set_rules('birth_day', 'Födelse dag', 'trim|required|min_length[2]|max_length[2]');
$this->form_validation->set_rules('username', 'Användarnamn', 'trim|required|min_length[4]|max_length[32]');
$this->form_validation->set_rules('password', 'Lösenord', 'trim|required|min_length[4]|max_length[32]');
$this->form_validation->set_rules('password2', 'Lösenord Konfirmera', 'trim|required|matches[password]');
$insert = $this->db->insert('users', $new_member_insert_data);
return $insert;
}
}
So what should I do to fix this?