Como eu faço para passar as chaves de um array como parâmetros de uma
url?
Por exemplo:
//array
$user['id'] = 1;
$user['nome'] = 'bruno';
$user['email'] = 'br...@teste.com';
//url
teste.php?id=1&nome=bruno&email=br...@teste.com
Alan Maia
Respondendo a sua pergunta: vc poderia usar foreach pra montar a sua url.
> --
> ============================================================
> LEIAM SEMPRE AS REGRAS DA LISTA:
> http://groups.google.com.br/group/listaphp/web/regras-da-lista-php
> --
> LISTA PHP > http://groups.google.com.br/group/listaphp
> --
> REVISTA PHP > http://www.revistaphp.com.br
> --
> AJAX-BRASIL > http://groups.google.com/group/ajax-brasil
> --
> PYTHON-GOOGLE > http://groups.google.com.br/group/python-google
> --
> DOTNET-BRASIL > http://groups.google.com.br/group/dotnet_br
> ============================================================
2010/2/17 Julio Protzek <juliop...@gmail.com>:
--
Jean C. Nascimento
Desenvolvedor Web
http://twitter.com/suissacorp
Zerotrack Inteligência Digital
http://zerotrack.com.br
http://twitter.com/zerotrack
(48) 3364-3147
$url = "teste.php?";
foreach ($user as $chave => $valor) {
$url .= "$chave=$valor&";
}
echo $url;
> --
> ============================================================
> LEIAM SEMPRE AS REGRAS DA LISTA:
> http://groups.google.com.br/group/listaphp/web/regras-da-lista-php
> --
> LISTA PHP > http://groups.google.com.br/group/listaphp
> --
> REVISTA PHP > http://www.revistaphp.com.br
> --
> AJAX-BRASIL > http://groups.google.com/group/ajax-brasil
> --
> PYTHON-GOOGLE > http://groups.google.com.br/group/python-google
> --
> DOTNET-BRASIL > http://groups.google.com.br/group/dotnet_br
> ============================================================
--
Gilberto M O Otani
gilbert...@gmail.com
se as vars estao na url
--
tenta assim:
$url = "test.php?".http_build_query($user);
http://www.php.net/manual/en/function.http-build-query.php
On Wed, Feb 17, 2010 at 21:15, Gilberto M O Otani
Use somente numeros de registro, id, enfim.
Passe essas info por um campo oculto via post e recupera em GET
Alan Maia
On Wed, 17 Feb 2010 21:15:32 -0200, Gilberto M O Otani
VELHO PASSA SOH O ID e busca as infos no banco!
--