{"id":44571,"date":"2019-05-18T03:01:49","date_gmt":"2019-05-17T17:01:49","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=44571"},"modified":"2019-05-16T21:08:52","modified_gmt":"2019-05-16T11:08:52","slug":"php-cookies-navigation-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/php-cookies-navigation-primer-tutorial\/","title":{"rendered":"PHP Cookies Navigation Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/sender_of_cookie.php\"><img decoding=\"async\" style=\"float:left;border: 15px solid pink;\" alt=\"PHP Cookies Navigation Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/setcookie.jpg\" title=\"PHP Cookies Navigation Primer Tutorial\"   \/><\/a><p class=\"wp-caption-text\">PHP Cookies Navigation Primer Tutorial<\/p><\/div>\n<p>Today&#8217;s tutorial is a bit &#8220;against the grain&#8221; for how we normally think, as far as navigation in web applications, goes.  For us, that is because &#8230;<\/p>\n<ul>\n<li>Instead of our usual $_GET (ie. equating to ? and &#038; web address bar URL parts) and $_POST (or even $_FILE uploads) we consider the use of serverside (PHP) cookies via use of $_COOKIE<\/li>\n<li>Instead of our usual clientside HTTP Cookie (along with Javascript) code today we use PHP serverside cookie code via <a \n target=_blank title='PHP setcookie info, thanks' href='https:\/\/www.php.net\/manual\/en\/function.setcookie.php'>setcookie<\/a> usages for parent updates of a &#8220;receiving&#8221; child piece of PHP within the parent&#8217;s HTML iframe element, the URL of which remains the same, navigated to by parent PHP calling itself to prompt cookie updates and HTML iframe redisplays<\/li>\n<\/ul>\n<p>As well as that new tab <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/sender_of_cookie.php\" title=\"Click picture\">live run<\/a> access method for <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/sender_of_cookie.php_GETME\" title=\"sender_of_cookie.php\">sender_of_cookie.php<\/a> parent&#8217;s supervision of <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/receiver_of_cookie.php_GETME\" title=\"receiver_of_cookie.php\">receiver_of_cookie.php<\/a> child (within HTML iframe element) navigation, there is nothing wrong with the parent being an iframe itself as per the access method below &#8230;<\/p>\n<p><iframe src='http:\/\/www.rjmprogramming.com.au\/PHP\/sender_of_cookie.php' style='width:100%;height:650px;'><\/iframe><\/p>\n<p><b><i>Did you know?<\/i><\/b><\/p>\n<p>The PHP <a target=_blank title='PHP $_REQUEST superglobal' href='https:\/\/www.php.net\/manual\/en\/reserved.variables.request.php'>$_REQUEST<\/a> is like a superglobal associative array that consists of &#8230;<\/p>\n<ul>\n<li>$_GET<\/li>\n<li>$_POST<\/li>\n<li>$_COOKIE<\/li>\n<\/ul>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d44571' onclick='var dv=document.getElementById(\"d44571\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/navigation\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d44571' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Today&#8217;s tutorial is a bit &#8220;against the grain&#8221; for how we normally think, as far as navigation in web applications, goes. For us, that is because &#8230; Instead of our usual $_GET (ie. equating to ? and &#038; web address &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/php-cookies-navigation-primer-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,37],"tags":[2913,2914,2915,2917,2525,1860,264,587,830,2411,932,997,2912,1319],"class_list":["post-44571","post","type-post","status-publish","format-standard","hentry","category-elearning","category-tutorials","tag-_cookie","tag-_get","tag-_post","tag-_request","tag-child","tag-cookie","tag-cookies","tag-iframe","tag-navigation","tag-parent","tag-php","tag-programming","tag-setcookie","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/44571"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=44571"}],"version-history":[{"count":3,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/44571\/revisions"}],"predecessor-version":[{"id":44574,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/44571\/revisions\/44574"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=44571"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=44571"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=44571"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}