Re: How do you do the ? mark after a filename

From: Date: Mon, 13 Nov 2006 05:02:51 +0000
Subject: Re: How do you do the ? mark after a filename
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-244541@lists.php.net to get a copy of this message
Thank you for that, it was a big help. Can I also call function that way? Again thank you for your help. Thomas Tom Chubb wrote:
On 12/11/06, Thomas Bonham <thomasbonham@bonhamlinux.org> wrote:
Hi All, I keep seeing the ? mark after many file names index.php?id=234. So what I would like to know is how do you make them. I have heard that they can make a programs life sampler when doing somethings with a database. Thank you, Thomas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
You can retrieve variables from the URL using the GET method. This is similar to using the POST method with data from forms. A typical url with something like www.domain.com/index.php?id=35&format=html would provide the page with two variables, id & format. It's the equivalent of putting the following in the page. $id = 35; $format = 'html'; This is popular with simple CMS/Templating systems where you use a standard page and the id variable loads the relevant article text. Hope that helps. Tom


« previous php.general (#244541) next »