CodeIgniter Forums
hey i need helpe asp please with this error 1048 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forum-5.html)
+--- Forum: General Help (https://forum.codeigniter.com/forum-24.html)
+--- Thread: hey i need helpe asp please with this error 1048 (/thread-74550.html)



hey i need helpe asp please with this error 1048 - brunoantunes13 - 10-07-2019

in my gratuadion work, i have this error in de sing in function(cadastrar) i dunno know why  ever time i try  a error mensage shows up (error 1048)

the controllerSad
public function cadastrar(){
  $this->load->model("usuarios_model");
  $this->usuarios_model->cadastro($usuario);

})

and the model(
public function cadastro($usuario)
  {
    $this->db->insert("tempusuarius",$usuario);


  })

and the php file(
<?php
        echo"<h1>cadastre-se</h1>";
        echo form_open("usuarios/novo");
        echo form_label('Nome','nome');
        echo form_input( array('Name' =>'nome' ,'id'=>'nome', 'maxlength'=>'255', 'class'=>'form-control' ));
        echo"<br>";
        echo form_label('Email','e-mail');
        echo form_input(array('name' =>'e-mail' ,'id'=>'e-mail','maxlength'=>'255','class'=>'form-control' ));
        echo"<br>";
        echo form_label('Senha','senha');
        echo form_password(array('name' =>'senha' ,'id'=>'senha','maxlength'=>'255','class'=>'form-control' ));
        echo"<br>";
        echo form_button(array('class' =>'btn btn-primary' ,'content'=>'cadastrar','type'=>'submit' ));
      echo form_close();?>


RE: hey i need helpe asp please with this error 1048 - Wouter60 - 10-07-2019

What type of variable is $usuario? Where do you set it's value?
What's the error message that you get (besides the error number, what message is showing up, for which line of code)?


RE: hey i need helpe asp please with this error 1048 - InsiteFX - 10-08-2019

Error 1048 means a column in your database table is null no value.

Check your form input values.