{"id":1721,"date":"2022-08-30T15:18:53","date_gmt":"2022-08-30T15:18:53","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/29\/get-session-issue-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:18:53","modified_gmt":"2022-08-30T15:18:53","slug":"get-session-issue-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/get-session-issue-collection-of-common-programming-errors\/","title":{"rendered":"Get session issue-Collection of common programming errors"},"content":{"rendered":"<p>Try this<\/p>\n<pre><code>\n    function getsession(){    \n        var name = \"\";\n        alert('Session value = &gt;' + name );\n    };\n\n<\/code><\/pre>\n<p>OR you can try this<\/p>\n<pre><code>  \/\/ To Read\n  $(function() {\n  \/\/Set the value to session\n  $.session.set(\"userName\", $(\"#uname\").val());\n  \/\/Get the value to session\n  alert($.session.get(\"myVar\"));\n  });\n<\/code><\/pre>\n<p id=\"rop\"><small>Originally posted 2013-11-29 06:17:42. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>Try this function getsession(){ var name = &#8220;&#8221;; alert(&#8216;Session value = &gt;&#8217; + name ); }; OR you can try this \/\/ To Read $(function() { \/\/Set the value to session $.session.set(&#8220;userName&#8221;, $(&#8220;#uname&#8221;).val()); \/\/Get the value to session alert($.session.get(&#8220;myVar&#8221;)); }); Originally posted 2013-11-29 06:17:42.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1721","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1721","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=1721"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1721\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1721"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1721"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1721"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}