CodeIgniter Forums
codeigniter post method - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: codeigniter post method (/showthread.php?tid=34613)



codeigniter post method - El Forum - 10-04-2010

[eluser]meera[/eluser]
Hi, i am new codeigniter..
I have created a form where the post method is working properly in IE but it is not working in firefox.
That is
This is my part of coding in view:
<form method=post action=‘addg’ name=‘myform’>
<input type=text name=‘pname’ id=‘pname’ value=’’ />
</form>
this my part of coding in controller
$pname=$this->input->Post(‘pname’);
echo “name=$pname
“;


I used echo to check the values but i can get only empty values in firefox but with the same code i can get values in IE.
Can any one tell me where i got the problem…..


codeigniter post method - El Forum - 10-04-2010

[eluser]mi6crazyheart[/eluser]
Are u using CI's form validation class. If not, try to use this...

More info: http://ellislab.com/codeigniter/user-guide/libraries/form_validation.html


codeigniter post method - El Forum - 10-05-2010

[eluser]Unknown[/eluser]
hi,
i think your CI`s coding is properly incorrect.
first of all you check coding carefully then you tried it.
--------------------------------------------------------------------------------------------------------------------
Earn an Extra $1000 to $1200 per month doing Part Time Data Entry Jobs! Work from home data entry jobs to post simple data submissions on Internet. Make $1 per entry. Easy form filling, data entry and ad posting jobs. No selling, No phone calls, No Marketing. No Investment. Bi-weekly payments. Full Training Provided. Pls visit:  Data-Entry 


codeigniter post method - El Forum - 10-05-2010

[eluser]SPeed_FANat1c[/eluser]
I modified your code and now it prints value when button is clicked:

view:

Code:
<form method=post action='test_controller/write' name=‘myform’>
<input type=text name='pname' value='' />
<?php echo form_submit();?>
</form>

controller:
Code:
function index()
    {
              
       $this->load->view('test/test');
        
    }
    
    function write()
    {
        echo $this->input->post('pname');
    }



codeigniter post method - El Forum - 10-05-2012

[eluser]giriayoga[/eluser]
[quote author="SPeed_FANat1c" date="1286272191"]I modified your code and now it prints value when button is clicked:

view:

Code:
<form method=post action='test_controller/write' name=‘myform’>
<input type=text name='pname' value='' />
<?php echo form_submit();?>
</form>

controller:
Code:
function index()
    {
              
       $this->load->view('test/test');
        
    }
    
    function write()
    {
        echo $this->input->post('pname');
    }
[/quote]
i agree with coding above....I was try it :-)


codeigniter post method - El Forum - 10-07-2012

[eluser]Unknown[/eluser]
I'm working on a simple login form. When the user clicks on the Login button, I want to send the post values to my controller, validate them against my database (using a model) and return a value. Based on that value, I want to either send the user to the member area, or display an error message on my form. This error message has a class 'error' and is hidden by default. I want to use jQuery's show() to show it when the credentials are wrong.

[url="http://powisofficesupplies.ca/"]montreal office supplies[/url]