[eluser]Unknown[/eluser]
actually am done already this
but now no records were inserted in my table
why this happened?
i'l send the controler code
pls give me the suggestions
thanq
Code:
<?php
class Welcomenote extends Controller {
function index()
{
$this->load->helper(array('form', 'url'));
$this->load->library('form_validation');
$this->form_validation->set_rules('firstname', 'Firstname', 'trim|required');
$this->form_validation->set_rules('lastname', 'Lastname', 'trim|required');
$this->form_validation->set_rules('username', 'Username', 'trim|required|min_length[5]|max_length[12]|xss_clean');
$this->form_validation->set_rules('password', 'Password', 'trim|required|matches[confirm_password]|md5');
$this->form_validation->set_rules('confirm_password', 'Password Confirmation', 'trim|required');
$this->form_validation->set_rules('email', 'Email', 'trim|required|valid_email');
$this->form_validation->set_rules('phonenumber', 'Phone Number', 'trim|required|numeric');
if ($this->form_validation->run() == FALSE)
{
$this->load->view('welcome_view');
}
else
{
$this->load->view('success_view');
}
}
function form_insert()
{
$this->db->insert('registrationform',$_POST);
}
}
?>