How to check browser cookie enabled with php and javascript


Cookies are typically used by web servers to perform functions such as tracking your visits to websites, enabling you to log in to sites, and storing your shopping cart. Cookies can be used to interaction between Javascript and Server Side Scripts like PHP.Cookies also used to transfer small amount of data between one page to…

Get URL Parameters Using Javascript


<script> function getQueryVariable(variable) { var query = window.location.search.substring(1); var vars = query.split(“&”); for (var i=0;i<vars.length;i++) { var pair = vars[i].split(“=”); if (pair[0] == variable) { return pair[1]; } } alert(‘Query Variable ‘ + variable + ‘ not found’); } </script> Now make a request to page.html?x=Hello <script> alert( getQueryVariable(“x”) ); </script>