[eluser]thedevilz[/eluser]
Hello,
I made a simple form, and passing it back to the controller
<form action="http://localhost/CodeIgniter/index.php/Contact" name="fom" method="post">
While if i use form_open('Contact');
it sends fine
Whether
<?php echo form_open('Contact','TRUE','fom'); ?>
&
<form action="http://localhost/CodeIgniter/index.php/Contact" method="post">
generates the same code except onsubmit function.
After Interprate it shows same code but the second line doesnot pass the form data to controller
_____________________________________________________________________________________________
here is the whole code of view::
<?php echo validation_errors(); ?>
<?php echo form_open('Contact','TRUE','fom'); ?>
[removed]
function validate_form ( )
{
if (document.fom.f_name.value == "" )
{
alert("Kindly Enter your name:");
return FALSE;
}
else
return TRUE;
}
//<form action="http://localhost/CodeIgniter/index.php/Contact" method="post">
[removed]
First Name
<input type="text" name="f_name" value="<?php echo set_value('f_name'); ?>"
Last Name
<input type="text" name="l_name" class="smallInput" size="16" value="<?php echo set_value('l_name'); ?>" />
Email</td>
<input name="e-mail" class="smallInput" size="16" value="<?php echo set_value('e-mail'); ?>"/></td>
<input type="submit" value="Submit" /></td>
<input type="reset" name="button2" id="button2" value="Reset" /></td>
</form>
Further I am bit confused if we call the method form_open(), what will the name of our form?Can we not set the name of the form through form_open()??
I have loaded the file in controll
$this->load->helper(array('form', 'url', 'html'));
Thanks in advance
need ur guidence