Jump to content

What does this code do?


Snorkel

Recommended Posts

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

$_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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...