if (!empty($_SERVER[‘HTTP_X_REQUESTED_WITH’]) && strtolower($_SERVER[‘HTTP_X_REQUESTED_WITH’]) == ‘xmlhttprequest’ ) { // It is ajax Request }
Read MoreMonth: November 2016
avoid duplicate value insertion on page refresh in php
TO AVOID DUPLICATE VALUE INSERT IN CORE PHP ON REFRESH:: During the post value insertion in the database, after refresh duplicate value inserted in the …
Read Morepopulate popup page using javascript
SHOW POPUP:: Javascript Code: function showmepop(plink,pname) { window.open(plink, pname, “top=10,left=20,width=600,height=400″); } Html code:: <button onclick=”showmepop(‘<?php echo $QUOTELINK;?>’,’test’);”>View</button>
Read MoreGet select box value among many select box using Jquery
AFTER APPEND IN BODY.. We Can Get value of selected select box using jquery. It works. checked already.. $(document).on(‘change’, “select.optn”, function () { var ID …
Read Morecombine two array in php
## COMBINE OF TWO ARRAYS INTO ONE ARRAY $PRO_QTY_ARR = array(); $TMP_M=0; $TMP_N=0; foreach($product_id_arr as $value) { $PRO_QTY_ARR[$TMP_M][‘P’] = $value; TMP_M++; } foreach($product_qty_arr as $q) …
Read MoreCombine Of two arrays into two array
## Combine two array elements into one array $PRO_QTY_ARR = array_combine($product_id_arr,$product_qty_arr); foreach($PRO_QTY_ARR as $key => $value) { echo $key; echo $value; }
Read Moresearch in php
## Here multiple word search is tried.. Its working.. $data = array(); $data[‘search_list’] = “”; $data[‘total_search’] = “”; $data[‘search_on’] = “”; $data[‘search_words’] = “”; $_searchfield …
Read MoreBlock a div content from cut copy paste
<script> // BLOCK COPY CUT PASTE $(document).ready(function() { $(‘#shr14-p’).bind(“cut copy paste”, function(e) { e.preventDefault(); }); }); </script> <style> // USE CSS FOR NOT HIGHLIGHT .shr14-unselectable{ …
Read Morehow to implement search in codeigniter
$_searchfield = $_REQUEST[‘key’]; $_searchfield = str_replace(“‘”, “”, $_searchfield); $query = $this->db->query(“SELECT * FROM td_product WHERE active=1 AND product_code like ‘$_searchfield’ UNION SELECT * FROM td_product …
Read More