Welcome Guest, Not a member yet? Register   Sign In
codeigniter post method
#1

[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…..
#2

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

More info: http://ellislab.com/codeigniter/user-gui...ation.html
#3

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

[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');
    }
#5

[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 :-)
#6

[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]




Theme © iAndrew 2016 - Forum software by © MyBB