Home > Net >  what does this line of code mean in html/php?
what does this line of code mean in html/php?

Time:12-15

I am trying to make sense of this line of code

    <a href="/index.php?g=Home&m=User&a=index&language=en-us" >

Well what I understand is this directs you to a hyperlink of some sort of file named index.php. But what's more to it? what does the code that follows index.php mean :

    ?g=Home&m=User&a=index&language=en-us

In fact I am trying to delete things on a web page (which I've been given the complete right to) that includes this in its url. http://www.holydata.com/index.php?m=User&a=login&language=en-us I looked at the source code on this page via the View Source function of google chrome. It showed exactly the page layout. However all the index.php files on the web server of this website look very different than it. I m trying to figure out how to access the file that contains the exact same source code of this web page in View Source. Please help!

CodePudding user response:

The code after the index.php are called the URL parameters.

?g=Home&m=User&a=index&language=en-us

You can access these parameters using

$g = $_GET['g']; // this will contain 'Home'
$m = $_GET['m']; // this will contain 'User'
$a = $_GET['a']; // this will contain 'index'
$language = $_GET['language']; // this will contain 'en-us'

Most probably you can find the code to access these parameters in your index.php.

  • Related