Understanding $_GET [#38] Code Dynamic Websites with PHP

Pubblicato il: 20 luglio 2014
sul canale di: Brad Hussey
5,295
40

Lecture 38: Understanding $_GET

When the URL the browser requests includes a query string (anything after a question mark), the $_GET collection is created automatically. The string on the left side of an equals sign ( = ) becomes a variable name, and the thing on the right side of the equals sign becomes that variable's value.

So, for example: in our previous lecture we have a link on our menu.php page that navigates to "dish.php?item=mexican-barbacoa". That URL will navigate to the dish.php template (which we have not created yet) and the $_GET collection will create a variable called "item" with the value of "mexican-barbacoa". We can then use that value to do something specific on our dish.php template.

It could be as simple as "echo mexican-barbacoa" or, "display specific information in an array with the key of 'mexican-barbacoa'" This is what we will be doing in our next lecture.

DOWNLOAD COURSE FILES HERE
http://www.bradhussey.ca/download-php...


In questa pagina del sito puoi guardare il video online Understanding $_GET [#38] Code Dynamic Websites with PHP della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Brad Hussey 20 luglio 2014, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 5,295 volte e gli è piaciuto 40 spettatori. Buona visione!