title: Current date to insert in mysql
body: <p>In this below code i have placed controller and model i insert firstname ,lastname,email address ,username ,password and date .But i cant insert my current date to mysql pls help to solve the issue.</p>
  
  <p>Controller:login</p>
  
  <pre><code>function create_member()
      {
          $this-&gt;load-&gt;library('form_validation');
  
          // field name, error message, validation rules
          $this-&gt;form_validation-&gt;set_rules('first_name', 'Name', 'trim|required');
          $this-&gt;form_validation-&gt;set_rules('last_name', 'Last Name', 'trim|required');
          $this-&gt;form_validation-&gt;set_rules('email_address', 'Email Address', 'trim|required|valid_email');
          $this-&gt;form_validation-&gt;set_rules('username', 'Username', 'trim|required|min_length[4]');
          $this-&gt;form_validation-&gt;set_rules('password', 'Password', 'trim|required|min_length[4]|max_length[32]');
          $this-&gt;form_validation-&gt;set_rules('password2', 'Password Confirmation', 'trim|required|matches[password]');
  
  
          if($this-&gt;form_validation-&gt;run() == FALSE)
          {
              $this-&gt;load-&gt;view('signup_form');
          }
  
          else
          {           
              $this-&gt;load-&gt;model('membership_model');
  
              if($query = $this-&gt;membership_model-&gt;create_member())
              {
                  $data['main_content'] = 'signup_successful';
                  $this-&gt;load-&gt;view('includes/template', $data);
              }
              else
              {
                  $this-&gt;load-&gt;view('signup_form');           
              }
          }
  </code></pre>
  
  <p>model:membership_model</p>
  
  <pre><code>function create_member()
      {
  
          $new_member_insert_data = array(
              'first_name' =&gt; $this-&gt;input-&gt;post('first_name'),
              'last_name' =&gt; $this-&gt;input-&gt;post('last_name'),
              'email_address' =&gt; $this-&gt;input-&gt;post('email_address'),         
              'username' =&gt; $this-&gt;input-&gt;post('username'),
              'date' =&gt; $this-&gt;input-&gt;post('date','curdate()'),
              'password' =&gt; md5($this-&gt;input-&gt;post('password'))                       
          );
  
          $insert = $this-&gt;db-&gt;insert('membership', $new_member_insert_data);
          if ($this-&gt;db-&gt;_error_number() == 1062)
                  {
                  echo"&lt;script&gt;alert('This value already exists');&lt;/script&gt;";
                  }
                  if ($this-&gt;db-&gt;_error_number() == "")
                  {
                  $this-&gt;session-&gt;set_flashdata('create', 'create');
                  }
  
          return $insert;
      }
  
  
  
  function curdate() {
      // gets current timestamp
      date_default_timezone_set('Asia/Manila'); // What timezone you want to be the default value for your current date.
      return date('Y-m-d H:i:s');
  }
  </code></pre>