## By calling this function on form submit, will confirm for submit <script> function confirmme() { var r = confirm(“Want To Submit this..??”); if(r) …
Read MorePHP
Php: show number with two decimal point
## make number format upto 2 decimal point here we can use, number_format(): echo number_format((float)$number, 2, ‘.’, ”); ## Example: $foo = “105”; echo number_format((float)$foo, …
Read Morefind key in array using php
## Find if key exists in the array list. Here key is searching in POST array. array_key_exists(‘status’, $_POST); Returns TRUE if the key exists and …
Read MoreRedirect to another page using javascript
Use this to redirect to another page. <script> window.location = “http://example.com/foo.php?option=500”; </script>
Read MoreHow to check ajax request or not
if (!empty($_SERVER[‘HTTP_X_REQUESTED_WITH’]) && strtolower($_SERVER[‘HTTP_X_REQUESTED_WITH’]) == ‘xmlhttprequest’ ) { // It is ajax Request }
Read Moreavoid 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 More