Ok sry I'm just starting learning PHP and I wanted to know how the bold part of the url is used in the php script:
Basically I don't know what this is called and that's why I haven't been able to find anything about it so even someone telling me what this is called would be helping...
I would really appreciate any help I get here...
This is one of the ways you can send data between pages in your site. for example:
cmd is a variable, and view_game is the value assigned to that variable. This information can be extracted from the url in a php script by the variable
$cmd = $_GET[cmd];
Might I suggest a good php tutorial, starting here:
echo $_GET['cmd']; // will output "view_game"
echo $_GET['id']; // will output "613"
echo $_GET['download']; // will output "1"
($_GET means the variable comes from the url.)
The text in the url is variables and the values of them. F.ex. the variable id has the value 613. In your script, you can check what the variables contain, and then generate your site based on those answers. F.eks. show info about a game with id 613 from your database.
When you make your url deside which file to include or what row to get from the database, you must remember to check each and every variable, so that your guests cannot use the url to destroy your site/database or see info/files they are not supposed to see. F.ex. id should only contain numbers and not be below zero.
Good luck learning php! It is very interresting!
Thanks a ton... I was looking all over for this and I couldn't find it anywhere...
Thank you all SO much!!!