Welcome Guest, Not a member yet? Register   Sign In
code igniter- form tag
#1

[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">&lt;input type="text" id="from"
name="from" /&gt;&lt;/td>
<td>City Code</td>
<td width="28" nowrap="nowrap">&lt;input type="text" id="fciti"
name="fciti" /&gt;&lt;/td>


</tr>
<tr>
<td>To</td>
<td width="28" nowrap="nowrap">&lt;input type="text" id="to" name="to"
/&gt;&lt;/td>
<td>City Code</td>
<td width="28" nowrap="nowrap">&lt;input type="text" id="tciti"
name="tciti" /&gt;&lt;/td>

</tr>
<tr>
<td>Fare</td>
<td width="28" nowrap="nowrap">&lt;input type="text" id="fare"
name="fare" /&gt;&lt;/td>

<td>Travels</td>
<td width="28" nowrap="nowrap">&lt;input type="text" id="travels"
name="travels" /&gt;&lt;/td>
</tr>


<tr>

<td>&lt;input type="submit" value="Submit"
class="submit" name="Submit" /&gt;&lt;/td>

</tr>


</table>
&lt;/form&gt;



I m trying to call my function in controllers to Views..and I dont see any output ? what is incorrect in the form tag : &lt;form class="index" method="post" action="&lt;?php echo base_url()?&gt;adminv/register" target=""&gt;


#2

[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?
#3

[eluser]vamsimohan1983[/eluser]
this is my controller :

&lt;?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//

}


}



}
#4

[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
#5

[eluser]Stefan Hueg[/eluser]
And please, put your code in the code tag. It makes it much more readable.
#6

[eluser]vamsimohan1983[/eluser]
what is code tag ?
#7

[eluser]Stefan Hueg[/eluser]
[ code ] your_code.... [/ code ]

(Without spaces)
#8

[eluser]FightingMan[/eluser]
you can use CI-form helper
#9

[eluser]InsiteFX[/eluser]
If you use POST REPLY instead of FAST REPLY it will give you a menu on top for all the tags!




Theme © iAndrew 2016 - Forum software by © MyBB