Welcome Guest, Not a member yet? Register   Sign In
how to post a form to the controller
#1

[eluser]Unknown[/eluser]
Hi Team,

I have created a controller

Code:
<?php
class conference extends CI_Controller {

    
    public function index()
    {
     $this->load->helper('url');
     $this->load->helper('form');
$this->load->view("login.php");

    }

    public function checklogin()
    {
     echo "some login test";
    }

}

?>

Now in the login.php file i need to action to checklogin
Code:
<form action="what do i put here" method='POST'>

I do not get what do I put in the action tag to submit to the checklogin function of the conference controller.

I tried using the following in routes.php

$route['conference/checklogin'] = "conference/checklogin";

but it does not work.

Can I do it using codeigniter or do I need to write my .htaccess file and do a url redirection.

Regards,
Anubhav Jha




Theme © iAndrew 2016 - Forum software by © MyBB