Pass value in another link using Ajax in Codeigniter, at first store value in a variable and follow the codes:
<script type="text/javascript"> var id = "1"; $.ajax({ type: "post", url: "<?php echo base_url('Controller/myfunction_name');?>", data1: {id:id}, cache: false, success: function(v1){ console.log(v1); } }); </script>
Question and answer is powered by AnsPress.io