Thats because that query string is like saying:
$ID = 5;
$ID = 6;
$ID = 23;
If this is a form that you can't change the ID field names to ID1, ID2, ID3,
etc. (which would probably be best) you could try something like:
<?php
$args = explode( "&", $QUERY_STRING);
foreach ( $args as $argz )
{
$argv = explode( "=", $argz);
unset( ${$argv[0]} );
}
foreach ( $args as $argz )
{
$argv = explode( "=", $argz);
if ( !isset(${$argv[0]}) )
{
${$argv[0]} = rawurldecode($argv[1]);
}
else
{
${$argv[0]} .= ",".rawurldecode($argv[1]);
}
}
?>
That will first unset all the variables that were defined automatically by
PHP, and do it how ASP does. It would be a better idea to store them in an
array instead of a CSV string, but whatever floats your boat.
Evan Nemerson
PS nice name ;)
On Sunday 28 April 2002 14:30 pm, you wrote:
> Hi to all.
>
> I pass parameters via querystring in this way:
> page.php?ID=5&ID=6&ID=23
>
> In $_GET["ID"] I get only the value 23 !!!!
> I am surprised 'cause in ASP I get 5,6,23.
>
> Is there a way to make things working to have a sequence of values
> separated by commas?
> Am I doing something wrong in PHP?
>
> Thanks for your help,
> Evan
--
Common sense is not so common.
Voltaire
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php