{"id":8514,"date":"2021-08-30T12:56:02","date_gmt":"2021-08-30T12:56:02","guid":{"rendered":"https:\/\/www.scmgalaxy.com\/tutorials\/?p=8514"},"modified":"2021-08-30T12:56:04","modified_gmt":"2021-08-30T12:56:04","slug":"tutorial-for-_get-in-super-global-variables","status":"publish","type":"post","link":"https:\/\/www.scmgalaxy.com\/tutorials\/tutorial-for-_get-in-super-global-variables\/","title":{"rendered":"Tutorial for $_GET in Super Global Variables"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">What is $_GET?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">$_GET is a global variable that is used to collect data from an HTML form after it has been submitted. The data is visible in the query string when the form uses method get to transmit data, thus the values are not concealed. The values in the URL are stored in the $_GET super global array variable.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/image.slidesharecdn.com\/learningphplecture1-180817175833\/95\/web-development-course-php-lecture-1-51-638.jpg?cb=1537307470\" alt=\"Web Development Course: PHP lecture 1\"\/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example:-<\/strong><\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/AdarshAshwani\/3845040ec659e08ac338265dc8fb1685.js\"><\/script>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Output:-<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Right now, we&#8217;re just seeing half of the rationale. We&#8217;ve generated a linked image of Nainital Lake in the preceding code, which will take us to the picture.php page and provide the parameters name=&#8221;Nainilake&#8221; and city=&#8221;Nainital&#8221; to it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That is, if we click on the little image of Nainital Lake, we will be brought to the next page picture.php, where the parameters will be displayed. These arguments will be given to the next page using the get method, and they will be shown in the address bar, as get is the default way. When we wish to transmit data to an address, we use a question mark (?) to connect them to the address.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The address has the name=Nainilake parameter connected to it. If we wish to add more values, we may do so by appending an ampersand (&amp;) after each key-value combination, similar to how city=Nainital is appended after the name parameter. Now, when you click on the image of Nainital Lake, we want the picture.php page to appear, along with the value of the parameter.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">$_POST vs $_GET<\/h3>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/image.slidesharecdn.com\/variables-171203082259\/95\/php-variables-and-scopes-8-638.jpg?cb=1512295062\" alt=\"PHP Variables and scopes\"\/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>What is $_GET? $_GET is a global variable that is used to collect data from an HTML form after it [&hellip;]<\/p>\n","protected":false},"author":33,"featured_media":8449,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[5388],"tags":[6590,6591,177,6298,5160,6541,6592,6542,670,6593],"class_list":["post-8514","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php","tag-_get","tag-_get-in-super-global-variables","tag-php","tag-php-tutorial","tag-super-global-variables","tag-super-global-variables-in-php","tag-tutorial-for-_get-in-super-global-variables","tag-tutorial-for-super-global-variables","tag-what","tag-what-is-_get"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Tutorial for $_GET in Super Global Variables - scmGalaxy<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.scmgalaxy.com\/tutorials\/tutorial-for-_get-in-super-global-variables\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Tutorial for $_GET in Super Global Variables - scmGalaxy\" \/>\n<meta property=\"og:description\" content=\"What is $_GET? $_GET is a global variable that is used to collect data from an HTML form after it [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/tutorial-for-_get-in-super-global-variables\/\" \/>\n<meta property=\"og:site_name\" content=\"scmGalaxy\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/profile.php?id=100003935402658\" \/>\n<meta property=\"article:published_time\" content=\"2021-08-30T12:56:02+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-08-30T12:56:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/Tutorial-for-Super-Global-Variables-in-PHP.png\" \/>\n\t<meta property=\"og:image:width\" content=\"650\" \/>\n\t<meta property=\"og:image:height\" content=\"290\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Ashwani Kumar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ashwani Kumar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/tutorial-for-_get-in-super-global-variables\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/tutorial-for-_get-in-super-global-variables\\\/\"},\"author\":{\"name\":\"Ashwani Kumar\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/19f28f8f969c1679bfb37d4dad6adc31\"},\"headline\":\"Tutorial for $_GET in Super Global Variables\",\"datePublished\":\"2021-08-30T12:56:02+00:00\",\"dateModified\":\"2021-08-30T12:56:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/tutorial-for-_get-in-super-global-variables\\\/\"},\"wordCount\":259,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/tutorial-for-_get-in-super-global-variables\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/Tutorial-for-Super-Global-Variables-in-PHP.png\",\"keywords\":[\"$_GET\",\"$_GET in Super Global Variables\",\"Php\",\"php tutorial\",\"Super Global Variables\",\"Super Global Variables in PHP\",\"Tutorial for $_GET in Super Global Variables\",\"Tutorial for Super Global Variables\",\"What\",\"What is $_GET\"],\"articleSection\":[\"php\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/tutorial-for-_get-in-super-global-variables\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/tutorial-for-_get-in-super-global-variables\\\/\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/tutorial-for-_get-in-super-global-variables\\\/\",\"name\":\"Tutorial for $_GET in Super Global Variables - scmGalaxy\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/tutorial-for-_get-in-super-global-variables\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/tutorial-for-_get-in-super-global-variables\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/Tutorial-for-Super-Global-Variables-in-PHP.png\",\"datePublished\":\"2021-08-30T12:56:02+00:00\",\"dateModified\":\"2021-08-30T12:56:04+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/19f28f8f969c1679bfb37d4dad6adc31\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/tutorial-for-_get-in-super-global-variables\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/tutorial-for-_get-in-super-global-variables\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/tutorial-for-_get-in-super-global-variables\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/Tutorial-for-Super-Global-Variables-in-PHP.png\",\"contentUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/Tutorial-for-Super-Global-Variables-in-PHP.png\",\"width\":650,\"height\":290},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/tutorial-for-_get-in-super-global-variables\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tutorial for $_GET in Super Global Variables\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\",\"name\":\"scmGalaxy\",\"description\":\"A Platform for Software Engineers\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/19f28f8f969c1679bfb37d4dad6adc31\",\"name\":\"Ashwani Kumar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b0fe597f4b8473400f95ce54bee0bdd62df08a319a198ad229b279aaab4f5410?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b0fe597f4b8473400f95ce54bee0bdd62df08a319a198ad229b279aaab4f5410?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b0fe597f4b8473400f95ce54bee0bdd62df08a319a198ad229b279aaab4f5410?s=96&d=mm&r=g\",\"caption\":\"Ashwani Kumar\"},\"description\":\"There is no end to education. It is not that you read a book, pass an examination, and finish with education. The whole of life, from the moment you are born to the moment you die, is a process of learning.\",\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/profile.php?id=100003935402658\",\"https:\\\/\\\/www.instagram.com\\\/adarshashwani\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/adarsh-ashwani-a75b23130\\\/\"],\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/author\\\/ashwani\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Tutorial for $_GET in Super Global Variables - scmGalaxy","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.scmgalaxy.com\/tutorials\/tutorial-for-_get-in-super-global-variables\/","og_locale":"en_US","og_type":"article","og_title":"Tutorial for $_GET in Super Global Variables - scmGalaxy","og_description":"What is $_GET? $_GET is a global variable that is used to collect data from an HTML form after it [&hellip;]","og_url":"https:\/\/www.scmgalaxy.com\/tutorials\/tutorial-for-_get-in-super-global-variables\/","og_site_name":"scmGalaxy","article_author":"https:\/\/www.facebook.com\/profile.php?id=100003935402658","article_published_time":"2021-08-30T12:56:02+00:00","article_modified_time":"2021-08-30T12:56:04+00:00","og_image":[{"width":650,"height":290,"url":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/Tutorial-for-Super-Global-Variables-in-PHP.png","type":"image\/png"}],"author":"Ashwani Kumar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Ashwani Kumar","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/tutorial-for-_get-in-super-global-variables\/#article","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/tutorial-for-_get-in-super-global-variables\/"},"author":{"name":"Ashwani Kumar","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/19f28f8f969c1679bfb37d4dad6adc31"},"headline":"Tutorial for $_GET in Super Global Variables","datePublished":"2021-08-30T12:56:02+00:00","dateModified":"2021-08-30T12:56:04+00:00","mainEntityOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/tutorial-for-_get-in-super-global-variables\/"},"wordCount":259,"commentCount":0,"image":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/tutorial-for-_get-in-super-global-variables\/#primaryimage"},"thumbnailUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/Tutorial-for-Super-Global-Variables-in-PHP.png","keywords":["$_GET","$_GET in Super Global Variables","Php","php tutorial","Super Global Variables","Super Global Variables in PHP","Tutorial for $_GET in Super Global Variables","Tutorial for Super Global Variables","What","What is $_GET"],"articleSection":["php"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.scmgalaxy.com\/tutorials\/tutorial-for-_get-in-super-global-variables\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/tutorial-for-_get-in-super-global-variables\/","url":"https:\/\/www.scmgalaxy.com\/tutorials\/tutorial-for-_get-in-super-global-variables\/","name":"Tutorial for $_GET in Super Global Variables - scmGalaxy","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/tutorial-for-_get-in-super-global-variables\/#primaryimage"},"image":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/tutorial-for-_get-in-super-global-variables\/#primaryimage"},"thumbnailUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/Tutorial-for-Super-Global-Variables-in-PHP.png","datePublished":"2021-08-30T12:56:02+00:00","dateModified":"2021-08-30T12:56:04+00:00","author":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/19f28f8f969c1679bfb37d4dad6adc31"},"breadcrumb":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/tutorial-for-_get-in-super-global-variables\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.scmgalaxy.com\/tutorials\/tutorial-for-_get-in-super-global-variables\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/tutorial-for-_get-in-super-global-variables\/#primaryimage","url":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/Tutorial-for-Super-Global-Variables-in-PHP.png","contentUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/Tutorial-for-Super-Global-Variables-in-PHP.png","width":650,"height":290},{"@type":"BreadcrumbList","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/tutorial-for-_get-in-super-global-variables\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.scmgalaxy.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Tutorial for $_GET in Super Global Variables"}]},{"@type":"WebSite","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website","url":"https:\/\/www.scmgalaxy.com\/tutorials\/","name":"scmGalaxy","description":"A Platform for Software Engineers","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.scmgalaxy.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/19f28f8f969c1679bfb37d4dad6adc31","name":"Ashwani Kumar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/b0fe597f4b8473400f95ce54bee0bdd62df08a319a198ad229b279aaab4f5410?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/b0fe597f4b8473400f95ce54bee0bdd62df08a319a198ad229b279aaab4f5410?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b0fe597f4b8473400f95ce54bee0bdd62df08a319a198ad229b279aaab4f5410?s=96&d=mm&r=g","caption":"Ashwani Kumar"},"description":"There is no end to education. It is not that you read a book, pass an examination, and finish with education. The whole of life, from the moment you are born to the moment you die, is a process of learning.","sameAs":["https:\/\/www.facebook.com\/profile.php?id=100003935402658","https:\/\/www.instagram.com\/adarshashwani\/","https:\/\/www.linkedin.com\/in\/adarsh-ashwani-a75b23130\/"],"url":"https:\/\/www.scmgalaxy.com\/tutorials\/author\/ashwani\/"}]}},"_links":{"self":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/8514","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/users\/33"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/comments?post=8514"}],"version-history":[{"count":1,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/8514\/revisions"}],"predecessor-version":[{"id":8521,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/8514\/revisions\/8521"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media\/8449"}],"wp:attachment":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media?parent=8514"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/categories?post=8514"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/tags?post=8514"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}