[eluser]Khaled Mahmud Tuhin[/eluser]
i am an amateur with codeigniter. i have managed to create a login from but after clicking login button no data can be seen.
in controller directory i have created code.php:
Code:
<?php class Code extends CI_Controller {
function __construct()
{
parent::__construct();
$this->view_data['base_url'] = base_url();
}
public function index (){
$this->load->view('index_code', $this->view_data);
}
function login()
{
echo "This is the out put" ;
}
}
in view directory i have created index_controller directory:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
Hello i Think this time i can do it.
Lets See about it
<h2>Log in to you Account</h2>
<?php echo form_open(base_url() . 'login'); ?>
<ul>
<li>
<label>username:</label>
<div><?php echo form_input(array('id' => 'username', 'name'=> 'username' )) ?>
</li>
<li>
<label>password</label>
<div><?php echo form_input(array('id' => 'password', 'name'=> 'password' )) ?>
</li>
<li> <?php echo form_submit(array('name' =>'submit') ,'Login') ?></li>
</ul>
<?php echo form_close(); ?>
</body>
</html>
//i have also created
Code:
$autoload['helper'] = array('form','url');
please tell me what should i do.