Welcome Guest, Not a member yet? Register   Sign In
PHP Scrit in C.I Method - Convertion
#3

Give all your inputs names, including the submit button. You can use the name "submit".
Your controller should load the form view only if "submit" wasn't posted.

The common logic for a function like that is:

PHP Code:
if (! $this->input->post('submit')) {
  //show the form
}
else {
  //show the view with results

In a later version, you can add form_validation.

The line
PHP Code:
if ($Form_data['form_fields'] == "N" 

doesn't make sense, because $form_data['form_fields'] is an array with all post values.
To determine if $sorte == "N", do this:
PHP Code:
if ( $this->input->post('sorte') == 'N') {
  ...

Reply


Messages In This Thread
PHP Scrit in C.I Method - Convertion - by Porto - 09-20-2019, 03:05 AM
RE: PHP Scrit in C.I Method - Convertion - by Wouter60 - 09-21-2019, 01:38 AM



Theme © iAndrew 2016 - Forum software by © MyBB