Prevent page from Submit on Refresh in PHP

00 [dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#abb8c3″ theme=”dark” language=”html” wrapped=”no”] <script src=”https://code.jquery.com/jquery-3.4.1.js”></script> <script type=”text/javascript”> $(document).ready(function () { if( window.history.replaceState ){ window.history.replaceState( null, null, window.location.href ); } }); </script> [/dm_code_snippet]

How do disable right click in Java Script

00 Disable full page  [dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#abb8c3″ theme=”dark” language=”html” wrapped=”no”] <html> <head> <title>Codelizar</title> <script src=”https://code.jquery.com/jquery-3.4.1.js”></script> <script type=”text/javascript”> $(document).ready(function () { $(“body”).on(“contextmenu”,function(e){ return false; }); </script> </head> <body> <h1>Right click disabled at whole page using body tag</h1> </body> </html> [/dm_code_snippet]   Disable Particular a div tag [dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#abb8c3″ theme=”dark” language=”html” wrapped=”no”] <html> <head> …

How to open a new tab window in javascript

00 How to open a new tab window in javascript Form.php [dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#abb8c3″ theme=”dark” language=”html” wrapped=”no”] <html> <head> <title>Codelizar</title> <script src=”https://code.jquery.com/jquery-3.4.1.js”></script> <script type=”text/javascript”> $(document).ready(function(){ $(‘#open_btn’).click(function(){ window.open(‘welcome.php, ‘_blank’); }); }); </script> </head> <body> <button id=”open_btn”>Click for open a new window</button> </body> </html> [/dm_code_snippet]   welcome.php [dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#abb8c3″ theme=”dark” language=”html” wrapped=”no”] <html> <head> …

How to fetch data of two array using array_walk in PHP

00 If you want to fetch value from more than two array in one loop using PHP [dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#abb8c3″ theme=”dark” language=”php” wrapped=”no”] <?php $array1 = array(‘laptop’,’deskop’,’mobile’); $array2 = array(‘Mouse’,’Keyboard’,’Printer’); $array3 = array(‘Grapes’,’Banana’,’Papaya’); array_walk( $array1, function ( $data, $val ) use ( $array2,$array3 ){ echo $data.”<br>”;         /* Fetch value from first …

How to post data using ajax in PHP

00 How to post data using ajax in PHP form.php [dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#abb8c3″ theme=”dark” language=”html” wrapped=”no”] <html> <head> <title>Codelizar</title> <script src=”https://code.jquery.com/jquery-3.4.1.js”></script> <script type=”text/javascript”> $(document).ready(function(){ $(‘#send_data’).click(function(){ var get_username = $(‘#cl_username’).val(); var get_pass = $(‘#cl_pass’).val(); $.ajax({ type:’POST’, url:’welcome.php’, data:’user_val=’+get_username+’&user_pass=’+get_pass, // send data using ajax success: function (get_response_data) { } }); }); }); </script> </head> <body> <table> …

How to send data with anchor tag in php from one page to another page

00 How to send or pass data through anchor tag in PHP Demo.php  [dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#abb8c3″ theme=”dark” language=”php” wrapped=”no”] <?php echo “<h1>Send single data using anchor tag</h1><br>”; $id = 5; $student_data = “Demo_another.php?send_id=”.$id; ?> [/dm_code_snippet] Demo_another.php [dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#abb8c3″ theme=”dark” language=”php” wrapped=”no”] <?php echo “<h1>Get single data using anchor tag</h1><br>”; echo $_REQUEST[‘send_id’]; ?> …

How to create multiple selector dropdown in HTML using Jquery

00 Single Selection in Dropdown and get value in Alert Box HTML CODE [dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#abb8c3″ theme=”dark” language=”markup” wrapped=”no”] <select class=”form-control min-select” name=”dropdown_single”> <option value=”pizza”>Pizza</option> <option value=”burger”>Burger</option> <option value=”hotdog”>Hot Dog</option> </select> [/dm_code_snippet] Jquery  CODE [dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#abb8c3″ theme=”dark” language=”javascript” wrapped=”no”] <script type=”text/javascript”> $(document).ready(function(){ $(‘select[name=”dropdown_single”]’).change(function() { alert($(this).val()) }); </script> [/dm_code_snippet] Multiple Selection in Dropdown …