Welcome Guest, Not a member yet? Register   Sign In
Creating basic Register (username/login/password)
#30

[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));
        }
    }


Messages In This Thread
Creating basic Register (username/login/password) - by El Forum - 08-04-2011, 07:19 PM
Creating basic Register (username/login/password) - by El Forum - 08-04-2011, 10:52 PM
Creating basic Register (username/login/password) - by El Forum - 08-05-2011, 01:56 AM
Creating basic Register (username/login/password) - by El Forum - 08-05-2011, 12:25 PM
Creating basic Register (username/login/password) - by El Forum - 08-05-2011, 12:35 PM
Creating basic Register (username/login/password) - by El Forum - 08-05-2011, 01:32 PM
Creating basic Register (username/login/password) - by El Forum - 08-05-2011, 02:15 PM
Creating basic Register (username/login/password) - by El Forum - 08-05-2011, 02:24 PM
Creating basic Register (username/login/password) - by El Forum - 08-05-2011, 02:35 PM
Creating basic Register (username/login/password) - by El Forum - 08-05-2011, 02:38 PM
Creating basic Register (username/login/password) - by El Forum - 08-05-2011, 02:39 PM
Creating basic Register (username/login/password) - by El Forum - 08-05-2011, 02:45 PM
Creating basic Register (username/login/password) - by El Forum - 08-05-2011, 02:47 PM
Creating basic Register (username/login/password) - by El Forum - 08-05-2011, 02:52 PM
Creating basic Register (username/login/password) - by El Forum - 08-05-2011, 02:54 PM
Creating basic Register (username/login/password) - by El Forum - 08-05-2011, 02:56 PM
Creating basic Register (username/login/password) - by El Forum - 08-05-2011, 03:03 PM
Creating basic Register (username/login/password) - by El Forum - 08-05-2011, 03:04 PM
Creating basic Register (username/login/password) - by El Forum - 08-05-2011, 03:05 PM
Creating basic Register (username/login/password) - by El Forum - 08-05-2011, 03:05 PM
Creating basic Register (username/login/password) - by El Forum - 08-05-2011, 03:07 PM
Creating basic Register (username/login/password) - by El Forum - 08-05-2011, 03:09 PM
Creating basic Register (username/login/password) - by El Forum - 08-05-2011, 03:09 PM
Creating basic Register (username/login/password) - by El Forum - 08-05-2011, 03:14 PM
Creating basic Register (username/login/password) - by El Forum - 08-05-2011, 03:15 PM
Creating basic Register (username/login/password) - by El Forum - 08-05-2011, 03:16 PM
Creating basic Register (username/login/password) - by El Forum - 08-05-2011, 03:18 PM
Creating basic Register (username/login/password) - by El Forum - 08-05-2011, 03:21 PM
Creating basic Register (username/login/password) - by El Forum - 08-05-2011, 03:23 PM
Creating basic Register (username/login/password) - by El Forum - 08-05-2011, 03:26 PM
Creating basic Register (username/login/password) - by El Forum - 08-05-2011, 03:27 PM
Creating basic Register (username/login/password) - by El Forum - 08-05-2011, 03:32 PM
Creating basic Register (username/login/password) - by El Forum - 08-05-2011, 03:33 PM
Creating basic Register (username/login/password) - by El Forum - 08-05-2011, 03:35 PM
Creating basic Register (username/login/password) - by El Forum - 08-05-2011, 03:38 PM



Theme © iAndrew 2016 - Forum software by © MyBB