Re: Post Array elements to URL / was: Database Search .............

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



--- Jason Wong <php-general@xxxxxxxxxxxx> wrote:

> you need to build a string which looks like:
> 
>   Stat[1]=value1&State[2]=value2...&Stat[n]=valuen
> 
> which you append to your URL like so:
> 

searchresults.php?Stat[1]=value1&Stat[2]=value2...&Stat[n]=valuen
> 
> This can be done using a foreach() on $_POST['Ind'],
> and implode(). Remember 
> to validate each item as you go along.


Not sure if this means I need to use both a foreach
and implode or one of them.

Right now I have this :

<?php
$stats = $HTTP_POST_VARS['stats'];
if (is_array($stats))
foreach ($stats as $key=>$val ) {
print "$key = $val<br />";
}
?>
 
I'm wondering how I change from printing it our to
getting into the URL.

Stuart

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux