code igniter- form tag |
[eluser]vamsimohan1983[/eluser]
<form class="index" method="post" action="<?php echo base_url()?>adminv/register" target=""> <table id="routeSearchMain" border="0" align="center" cellpadding="30" bgcolor="#C2DFFF"> <tr> <td>From</td> <td width="28" nowrap="nowrap"><input type="text" id="from" name="from" /></td> <td>City Code</td> <td width="28" nowrap="nowrap"><input type="text" id="fciti" name="fciti" /></td> </tr> <tr> <td>To</td> <td width="28" nowrap="nowrap"><input type="text" id="to" name="to" /></td> <td>City Code</td> <td width="28" nowrap="nowrap"><input type="text" id="tciti" name="tciti" /></td> </tr> <tr> <td>Fare</td> <td width="28" nowrap="nowrap"><input type="text" id="fare" name="fare" /></td> <td>Travels</td> <td width="28" nowrap="nowrap"><input type="text" id="travels" name="travels" /></td> </tr> <tr> <td><input type="submit" value="Submit" class="submit" name="Submit" /></td> </tr> </table> </form> I m trying to call my function in controllers to Views..and I dont see any output ? what is incorrect in the form tag : <form class="index" method="post" action="<?php echo base_url()?>adminv/register" target="">
[eluser]Stefan Hueg[/eluser]
First, put code in the code-tag next time. Second, there is nothing wrong with it. Have you built a complete HTML structure around your form? How does your controller function look like?
[eluser]vamsimohan1983[/eluser]
this is my controller : <?php session_start(); class Adminv extends CI_Controller { public function index() { $this->load->view('adminverification');//exact file name// } public function register() { $this->load->helper('form'); $this->load->helper('html'); $this->load->model('admin_mod'); if(isset($_POST['Submit'])) { $from = $this->input->post('from'); $fciti = $this->input->post('fciti'); $to= $this->input->post('$to'); $tciti= $this->input->post('tciti'); $fare= $this->input->post('fare'); $travels= $this->input->post('$travels'); $this->Admin_mod->entry_insert();//class name// } } }
[eluser]Stefan Hueg[/eluser]
Code: session_start(); Remove it and let CodeIgniter handle your session data by autoloading the session-class. Here is the detailed description: http://ellislab.com/codeigniter/user-gui...sions.html
[eluser]Stefan Hueg[/eluser]
And please, put your code in the code tag. It makes it much more readable.
[eluser]Stefan Hueg[/eluser]
[ code ] your_code.... [/ code ] (Without spaces)
[eluser]InsiteFX[/eluser]
If you use POST REPLY instead of FAST REPLY it will give you a menu on top for all the tags! |
Welcome Guest, Not a member yet? Register Sign In |