mysql - How to use $_GET to get multiple parameters using the same name in PHP -
i'm starting php bare me..
i'm using checkboxes search mysql database have created. checkboxes use same name, when use $_get, gets last value in url.
for example: http://www.website.com/search.php?features=textures&features=items&style=realistic&submit=search
would return items, , override textures.
is there way store both values, , use these values search database?
thanks in advance!
php little odd here. using standard form data parser, must end name of controls []
in order access more 1 of them.
<input type="checkbox" name="foo[]" value="bar"> <input type="checkbox" name="foo[]" value="bar"> <input type="checkbox" name="foo[]" value="bar">
will available array in:
$_get['foo'][]
if don't want rename fields, need access raw data ($_server['request_uri']
) , parse (not i'd recommend).
Comments
Post a Comment