faqts : Computers : Programming : Languages : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

37 of 63 people (59%) answered Yes
Recently 7 of 10 people (70%) answered Yes

Entry

Can you send an array through a url (getting info without a form)?

Nov 27th, 2008 14:29
healthy man, dman, Jason Pell, Justin H,


You you can in a similar way to sending multiple values from a MULTIPLE
SELECT object, by specifying the url variable names with []
For example:
   www.myserver.com/index.php?name[]=Jason&name[]=Mathew&name[]=Pell
To be absolutely sure everything works correctly, you might like
to escape the [ and ] characters using: %5B%5D
The above url query to index.php would result in a $HTTP_GET_VARS (php
4.0.x) variable in php of:
Array
(
    [name] => Array
        (
            [0] => Jason
            [1] => Mathew
            [2] => Pell
        )
)
-jasonpell
http://www.healthdothealth.com
http://www.healthxhealth.com
http://www.mesotheliomainmesothelioma.com
http://www.healthfirewall.com
http://www.flathealth.com
http://www.healthbodyguard.com