kbrk
kbrk

Reputation: 660

codeigniter 2.2.0 $this->input->post returns false

I have a text input in a form.

<form role="form" id="form" class="form-signin" method="post" action="">
    <input id="email" name="email" class="form-control" placeholder="E-mail" name="email" type="email" >
    ...
</form>

I want to get input value in controller; When I print or var_dump ($this->input->post('email')); it returns false.

How can I get this value. Thank you..

Upvotes: 0

Views: 1297

Answers (2)

S.M_Emamian
S.M_Emamian

Reputation: 17383

Make sure you use http://www.yoursite.com instead of http://yoursite.com .

Upvotes: 1

deviloper
deviloper

Reputation: 7240

MAke sure your form has an action value to the function you want to submit the form values to.

<form role="form" id="form" class="form-signin" method="post" action="Controller/function">
    <input id="email" name="email" class="form-control" placeholder="E-mail" name="email" type="email" >
   <input type="submit" value="submit" />
...
</form>

Upvotes: 0

Related Questions