[eluser]terry101[/eluser]
yea it was i made a error...good eye. i got a error on line 14? almost there :-)
! ) Fatal error: Call to undefined function query() in C:\wamp\www\code\application\models\usermodel.php on line 14
Line 14
Code:
$this->db-query($query_str, array($username,$name,$email,$sha1_password));
Code:
<?php
class Usermodel extends CI_Model {
function __Usermodel() {
parent::__Model();
}
function register_user($username, $name, $email, $password) {
$sha1_password = sha1($password);
$query_str = "INSERT INTO tbregister (username, password, name, email) Value ('{$username}', '{$name}', '{$email}', '{password}')";
$this->db-query($query_str, array($username,$name,$email,$sha1_password));
}
}