Welcome Guest, Not a member yet? Register   Sign In
Form actions
#1

[eluser]baalwww[/eluser]
YANQ (yet another newbie question)... I have the form action in my form as
Code:
action="admin/process_login"

What I find is that when I submit the form, the function index() in my controller gets executed. I end up back at the login form, via index() calling login() in the controller, with the uri showing being index.php/admin/login and the '***here' in the code below not appearing. This is all fixed if I have the action as
Code:
<?php echo base_url();?>index.php/admin/process_login
but I shouldn't have to have the full url all the time, should I?

Here is the applicable part of my controller

Code:
function index()
      {
          if(! $admin_id=$this->session->userdata('admin_id')):
                redirect('/admin/login/', 'refresh');
          endif;
      }

      
      function process_login()
      {
      echo '***here';
      }


Messages In This Thread
Form actions - by El Forum - 11-29-2008, 10:11 PM
Form actions - by El Forum - 11-29-2008, 10:50 PM
Form actions - by El Forum - 11-30-2008, 05:00 PM
Form actions - by El Forum - 12-01-2008, 12:30 AM
Form actions - by El Forum - 01-08-2009, 11:42 AM
Form actions - by El Forum - 01-08-2009, 11:47 AM
Form actions - by El Forum - 01-08-2009, 12:56 PM
Form actions - by El Forum - 01-08-2009, 01:02 PM
Form actions - by El Forum - 01-08-2009, 01:21 PM
Form actions - by El Forum - 01-08-2009, 02:27 PM
Form actions - by El Forum - 01-08-2009, 02:58 PM
Form actions - by El Forum - 01-08-2009, 03:05 PM
Form actions - by El Forum - 01-08-2009, 03:15 PM
Form actions - by El Forum - 01-08-2009, 03:37 PM



Theme © iAndrew 2016 - Forum software by © MyBB