Welcome Guest, Not a member yet? Register   Sign In
How to keep url clean on calling $this->index()
#9

[eluser]CodeIgniteMe[/eluser]
If you really want to get back to your original URIs you can set your validation at the same function.

Code:
<?php
Class Some extends CI_Controller{

function index()
{
if(isset($_POST['btnSubmit'])) // if the form isn't submitted yet, you skip validation
{
$this->validate_user();
}

$this->load->view('validation form');

}

function validate_user()
{
// your validation and/or redirects here
}

}

in your view
Code:
// with short_open_tags open
<?=form_open('some/index');?>
// your form codes
<?=form_close();?>


Messages In This Thread
How to keep url clean on calling $this->index() - by El Forum - 06-29-2011, 07:47 AM
How to keep url clean on calling $this->index() - by El Forum - 06-29-2011, 07:52 AM
How to keep url clean on calling $this->index() - by El Forum - 06-29-2011, 08:05 AM
How to keep url clean on calling $this->index() - by El Forum - 07-01-2011, 02:45 AM
How to keep url clean on calling $this->index() - by El Forum - 07-01-2011, 02:56 AM
How to keep url clean on calling $this->index() - by El Forum - 07-01-2011, 06:14 AM
How to keep url clean on calling $this->index() - by El Forum - 07-07-2011, 09:27 PM
How to keep url clean on calling $this->index() - by El Forum - 07-09-2011, 02:41 AM
How to keep url clean on calling $this->index() - by El Forum - 07-10-2011, 07:40 PM



Theme © iAndrew 2016 - Forum software by © MyBB