Posts

Showing posts with the label codeigniter-3

how to change the function name in the url using codeigniter?

how to change the function name in the url using codeigniter? I want to change the function name in the url, i searched for this a lot but unable to find any solution, can any one help me out what should i do consider for example i have a url like http://localhost/codeIgniter_try/index.php/Blog/blogvieww , http://localhost/codeIgniter_try/index.php/Blog/blogvieww so here "Blog" is the controller name and "blogvieww" is the function name so if i want to change the function name from "blogvieww" to "blogvieww_all" what can i do? Blog.php <?php defined('BASEPATH') OR exit('No direct script access allowed'); class Blog extends CI_Controller { public function index() { $this->load->view('blogview'); } public function blogvieww() { $this->load->view('blogvieww'); } }...

How to block emoticons from input text field in codeignitier

How to block emoticons from input text field in codeignitier I want to make input text field in such a way that it will block emoticons entry in text input field. I have made validation on controller for particular route by passing.Is it is a right way to block emoticons. Controller code. $this->form_validation->set_rules('registration', 'Registration', 'required|alpha_numeric'); $this->form_validation->set_rules('odometer', 'Odometer', 'required|alpha_numeric'); view code: <input type="text" name="odometer" placeholder="Odometer" class="form-control profileControl odometer required number" id="odometer-<?php echo $vehicle_count; ?>" value="<?php echo $vehicle->intCarOdometer ?>"/> <input type="text" placeholder="Registration" name="registration" class="form-control profileControl registration req...