Snorkel Posted November 16, 2017 Share Posted November 16, 2017 Hello All, This is my first post as I am new to PHP. I am learning how to develop web apps for education using PHP, CSS and HTML. I dont know any of those languages. My question is what does the following code do/mean?: $page = ($_GET['page']) Link to comment Share on other sites More sharing options...
justsomeguy Posted November 16, 2017 Share Posted November 16, 2017 It just sets a variable to another value. That value comes from $_GET, which holds all of the values that were included in the URL. 1 Link to comment Share on other sites More sharing options...
iwato Posted November 17, 2017 Share Posted November 17, 2017 $_GET is a called a superglobal in PHP. It is a wrapper for one to many variables sent via an HTTP request. HTTP REQUEST: http://www.grammarcaptive.com?hash=30a6836a3f7c5fc57751a61098e5c221&podcast_no=21 URL Without a Query String: http://www.grammarcaptive.com Query String: ? + hash=30a6836a3f7c5fc57751a61098e5c221 + & + podcast_no=21 The string literal '30a6836a3f7c5fc57751a61098e5c221' becomes the value of $_GET['hash'] The number 21 becomes the value of $_GET['podcast_no'] Link to comment Share on other sites More sharing options...
Snorkel Posted November 20, 2017 Author Share Posted November 20, 2017 Thank You All. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now