[eluser]alamin_cse07[/eluser]
here is my controller code and view code .but when i click on register the error"Object not found!The requested URL was not found on this server." please help me about this.
Code:
<?php
class User extends CI_Controller {
function __construct() {
parent::__construct();
$this->view_data['base_url']=base_url();
}
function index()
{
$this->register();
}
function register()
{
$this->load->view('view_register',$this->view_data);
}
}
?>
view code:
Code:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style>
form li{
list-style:none;
}
</style>
</head>
<body>
<p> User Registration Form </p>
<?php
echo form_open($base_url . 'user/register');
$username=array(
'name' =>'reg_username',
'id' => 'reg_id',
'value' =>''
);
$name=array(
'name' =>'name',
'id' => 'name',
'value' =>''
);
$email=array(
'name' =>'email',
'id' => 'email',
'value' =>''
);
$password=array(
'name' =>'password',
'id' => 'password',
'value' =>''
);
$password2=array(
'name' =>'password2',
'id' => 'password2',
'value' =>''
);
?>
<ul>
<li>
<label>Username</label>
<div>
<?php echo form_input($username);?>
</div>
</li>
<li>
<label>Name</label>
<div>
<?php echo form_input($name);?>
</div>
</li>
<li>
<label>Email</label>
<div>
<?php echo form_input($email);?>
</div>
</li>
<li>
<label>Password</label>
<div>
<?php echo form_password($password);?>
</div>
</li>
<li>
<label>Conform Password</label>
<div>
<?php echo form_password($password2);?>
</div>
</li>
<li><?php echo validation_errors()?>
</li>
<li>
<div>
<?php echo form_submit(array('name'=>'register'),'Register');?>
</div>
</li>
</ul>
<?php
echo form_close();
?>
</body>
</html>