User Registration and Form Validation Using CodeIgniter
- //validate form input
- $this->form_validation->set_rules('guest_title', 'Title', 'required|xss_clean');
- $this->form_validation->set_rules('first_name', 'First Name', 'required|xss_clean');
- $this->form_validation->set_rules('last_name', 'Last Name', 'required|xss_clean');
- $this->form_validation->set_rules('birth_date_year', 'Year', 'xss_clean');
- $this->form_validation->set_rules('birth_date__nc_month', 'Month', 'xss_clean');
- $this->form_validation->set_rules('birth_date__nc_day', 'Day', 'xss_clean');
- $this->form_validation->set_rules('company', 'Company', 'xss_clean');
- $this->form_validation->set_rules('url', 'Website', 'xss_clean');
- $this->form_validation->set_rules('address', 'Address', 'required|xss_clean');
- $this->form_validation->set_rules('address_2', 'Address 2', 'xss_clean');
- $this->form_validation->set_rules('city', 'City', 'required|xss_clean');
- $this->form_validation->set_rules('state', 'State/Province', 'xss_clean');
- $this->form_validation->set_rules('country', 'Country', 'required|xss_clean');
- $this->form_validation->set_rules('zipcode', 'Zip/Postal code', 'required|xss_clean');
- $this->form_validation->set_rules('phone', 'Phone', 'required|xss_clean');
- $this->form_validation->set_rules('email', 'Email Address', 'required|valid_email');
- $this->form_validation->set_rules('username', 'Username', 'required|xss_clean');
- $this->form_validation->set_rules('password', 'Password', 'required|matches[password_confirm]');
- $this->form_validation->set_rules('password_confirm', 'Password Confirmation', 'required');
To configure CodeIgniter,please refer to Getting Started With CodeIgniter.
Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.
Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.
FOR YOUR OWN SAFETY, PLEASE:
1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
Comments
Being redirected
CodeIgniter
dein code hat nur ein grossses loch >>> $config['csrf_protection'] = FALSE; <<
$config['csrf_protection'] = TRUE; <<< sollte es sein ..
your code only has a big hole >>> $config['csrf_protection'] = FALSE; <<
$config['csrf_protection'] = TRUE; <<<it should be .. and I'm also looking for how to do it right
how to create single notification
hello, thanks before but i have a question how to make it only has single notification,
so notice display step by step not list
Regards
Add new comment
- Add new comment
- 495 views