Welcome Guest, Not a member yet? Register   Sign In
The requested URL /ci/er/test was not found on this server.
#1

[eluser]Unknown[/eluser]
I found the video tutorial of login and worked according to that, following code area where I worked out but still I getting Error 404 .
I try to flowing code also
<?php echo form_open(base_url(). 'usertest/test' ) ?>
/* i used following code also to place of above line */
<?php echo form_open('usertest/test' ) ?>
I am using 2.0.2 ver of CI.

****************************************************************************************
// Base url

$config['base_url'] = 'http://localhost/ci/';

****************************************************************************************
//config file

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Usertest extends CI_Controller {
public function index()
{
$this->load->view('view_login');
}
public function test()
{
echo 'Look at this!';
}
}
****************************************************************************************
//view_login.php
//Body Part

<Table cellspacing="5" cellpadding="3" border="0" align="center" style="background-color:#CCCCFF; borderConfusedolid 1px #CC99FF;" id="login_form">
&lt;?php echo form_open(base_url(). 'user/test' ) ?&gt;
/* i used following code also to place of above line */
&lt;?php echo form_open('usertest/test' ) ?&gt;

<tr>
<td>User Name </td>
<td>:</td>
<td>&lt;?php echo form_input(array('id'=>'username', 'name'=>'username'));?&gt;</td>
</tr>
<tr>
<td>Password </td>
<td>:</td>
<td>&lt;?php echo form_password(array('id'=>'password', 'name'=>'password'));?&gt;</td>
</tr>
<tr>
<td></td>
<td></td>
<td>&lt;?php echo form_submit(array('name'=>'submit'), 'Login');?&gt;</td>
</tr>

&lt;?php echo form_close(); ?&gt;

</table>

****************************************************************************************

// when i execute this script show following error

Not Found

The requested URL /ci/user/test was not found on this server.
#2

[eluser]Unknown[/eluser]
Is any one who can reply this ??
#3

[eluser]osci[/eluser]
Code:
&lt;?php echo form_open(base_url(). 'user/test' ) ?&gt;
// should be
&lt;?php echo form_open(base_url(). 'usertest/test' ) ?&gt;

You should look at the obvious. What error is it giving?? page not found for user/test. Do I have a user controller?

And pls next time post your code in [ code] [/ code] tags
#4

[eluser]InsiteFX[/eluser]
The tag should also be closed with the ;

InsiteFX




Theme © iAndrew 2016 - Forum software by © MyBB