hi all, please kindly give me advice and help me on my project this is just a piece of it. thanks and God Bless.
i got this database error
**A PHP Error was encountered
Severity: Notice
Message: Undefined index: username
Filename: controllers/login.php
Line Number: 20
A PHP Error was encountered
Severity: Notice
Message: Undefined index: password
Filename: controllers/login.php
Line Number: 21**
and this would be my controller
login.php --controller
<?php if(!defined('BASEPATH')) exit('no direct script access allowed');
class login extends CI_Controller
{
public function __construct()
{
parent::__construct();
}
public function index()
{
$this->load->helper(array('form', 'url'));
$this->load->view('login_view');
}
public function regprocess()
{
$username=$_POST['username'];
$password=$_POST['password'];
$this->user->insert($username,$password);
redirect('login');
}
}
?>