• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Form not submitting data

#6
Like kierownik said: $_POST (or $this->input->post()) will only have values if the inputs have names.
Best practice is to give the submit button a name also:
PHP Code:
<button type="submit" name="submit" class="hollow button submit">Submit</button

Then, in your controller:
PHP Code:
if ($this->input->post('submit')) {
 
  // handle form input
}
else {
 
  // show form

Reply


Messages In This Thread
Form not submitting data - by majortom84 - 09-05-2018, 12:51 PM
RE: Form not submitting data - by kierownik - 09-05-2018, 04:22 PM
RE: Form not submitting data - by majortom84 - 09-06-2018, 06:36 AM
RE: Form not submitting data - by php_rocs - 09-05-2018, 04:23 PM
RE: Form not submitting data - by neuron - 09-05-2018, 11:06 PM
RE: Form not submitting data - by neuron - 09-05-2018, 10:58 PM
RE: Form not submitting data - by Wouter60 - 09-06-2018, 02:48 AM
RE: Form not submitting data - by InsiteFX - 09-06-2018, 09:13 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.