{"id":729,"date":"2014-04-23T08:40:15","date_gmt":"2014-04-23T12:40:15","guid":{"rendered":"http:\/\/www.searchenginegenie.com\/programming-blog\/?p=729"},"modified":"2014-04-23T08:57:17","modified_gmt":"2014-04-23T12:57:17","slug":"php-sessions","status":"publish","type":"post","link":"https:\/\/www.searchenginegenie.com\/programming-blog\/php-sessions\/","title":{"rendered":"PHP Sessions"},"content":{"rendered":"<h2>Starting a PHP Session<\/h2>\n<ul>\n<li>The session_start() function must appear BEFORE the &lt;html&gt; tag:<\/li>\n<\/ul>\n<p>[php]<\/p>\n<p>&lt;?php session_start(); ?&gt;<\/p>\n<p>&lt;html&gt;<br \/>\n&lt;body&gt;<br \/>\n&lt;\/body&gt;<br \/>\n&lt;\/html&gt;<br \/>\n[\/php]<\/p>\n<ul>\n<li>The above code is used to register the user session in server.<\/li>\n<\/ul>\n<h2>Destroying a Session<\/h2>\n<p>[php]<br \/>\n&lt;?php<br \/>\nsession_destroy();<br \/>\n ?&gt;<br \/>\n[\/php]<\/p>\n<ul>\n<li>The above code is used to destroy the complete session from the server.<\/li>\n<\/ul>\n<p>NOTE : \u00a0The session is very very important to save the current user information on the server. Using UID(user id), The server saves the user information on the server.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Starting a PHP Session The session_start() function must appear BEFORE the &lt;html&gt; tag: [php] &lt;?php session_start(); ?&gt; &lt;html&gt; &lt;body&gt; &lt;\/body&gt; &lt;\/html&gt; [\/php] The above code is used to register the user session in server. Destroying a Session [php] &lt;?php session_destroy(); ?&gt; [\/php] The above code is used to destroy the complete session from the server. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,43,1],"tags":[],"class_list":["post-729","post","type-post","status-publish","format-standard","hentry","category-php","category-programmer","category-programming"],"_links":{"self":[{"href":"https:\/\/www.searchenginegenie.com\/programming-blog\/wp-json\/wp\/v2\/posts\/729","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.searchenginegenie.com\/programming-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.searchenginegenie.com\/programming-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.searchenginegenie.com\/programming-blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.searchenginegenie.com\/programming-blog\/wp-json\/wp\/v2\/comments?post=729"}],"version-history":[{"count":5,"href":"https:\/\/www.searchenginegenie.com\/programming-blog\/wp-json\/wp\/v2\/posts\/729\/revisions"}],"predecessor-version":[{"id":734,"href":"https:\/\/www.searchenginegenie.com\/programming-blog\/wp-json\/wp\/v2\/posts\/729\/revisions\/734"}],"wp:attachment":[{"href":"https:\/\/www.searchenginegenie.com\/programming-blog\/wp-json\/wp\/v2\/media?parent=729"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.searchenginegenie.com\/programming-blog\/wp-json\/wp\/v2\/categories?post=729"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.searchenginegenie.com\/programming-blog\/wp-json\/wp\/v2\/tags?post=729"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}