hey i need helpe asp please with this error 1048 |
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 controller 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();?>
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)?
Error 1048 means a column in your database table is null no value.
Check your form input values. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |