Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class New extends Controller
- {
- function index()
- {
- $this->load->view('new_view');
- }
- function validate()
- {
- $this->form_validation->set_rules('author', 'Author', 'required|min_length[3]|max_length[50]');
- $this->form_validation->set_rules('message', 'Message', 'required|min_length[3]');
- if($this->form_validation->run() == TRUE)
- {
- // If the form validation run true..
- }
- else
- {
- // If it dosen't..
- }
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement