Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --------/controllers/home.php-----------------
- function processListRates(){
- $this->load->helper('url');
- $this->load->database();
- $this->load->model('Eazyteldb');//load model
- $sql = "SELECT * FROM eazytel_web_rate WHERE destination
- LIKE'''%".$this->input->post("textInserted")."')";
- $this->db->query($sql);
- }
- ---------/views/home.php------------------------
- $(document).ready(function(){
- //SEND DATA
- jQuery('#countryrate').keypress(function(){
- $.post("home/processListRates","textInserted="+jQuery('#countryrate').val(),processResponse);
- });//end keypress
- //RECEIVE DATA
- function processResponse(data){
- .......
- };
- });//END ready
Add Comment
Please, Sign In to add comment