Page 1 of 1
get method
Posted: Sun Mar 23, 2003 12:06 am
by Malder
1) When i run script with parameters ("localhost://script.php?www.server.com=main&php=cool") and in script look at him(param) using variable $_GET, i get "www_server_com...". Why? & what can be done? I found the way out in $_ENV variable, but that's not comfortable cause there can be several parameters and $_ENV[$QUERY_STRING] is string.
2) How to open link in new window?
Thanks guys for your help!
Posted: Sun Mar 23, 2003 1:14 am
by hob_goblin
you can't have a period in a variable name.
Posted: Sun Mar 23, 2003 2:03 am
by volka
and for your second question:
<a href="url" target="windowname" >
Posted: Sun Mar 23, 2003 5:29 am
by Malder
i meant how to open url in new window in PHP and not in broyzer
Posted: Sun Mar 23, 2003 6:13 am
by Malder
hob_goblin wrote:you can't have a period in a variable name.
then how to send url_name via "get"?
Posted: Sun Mar 23, 2003 6:22 am
by twigletmac
Malder wrote:hob_goblin wrote:you can't have a period in a variable name.
then how to send url_name via "get"?
Don't make it a variable name, make it a variable. E.g.:
Code: Select all
localhost://script.php?url=www.server.com&page=main&php=cool
instead of
Code: Select all
localhost://script.php?www.server.com=main&php=cool
then you can access the url through $_GET['url'].
Mac
Posted: Sun Mar 23, 2003 6:27 am
by twigletmac
Malder wrote:i meant how to open url in new window in PHP and not in broyzer
Do you mean redirecting to another page?
header()
Code: Select all
header('Location: http://www.somesite.com/');
Mac
Posted: Sun Mar 23, 2003 10:58 pm
by Malder
Do you mean redirecting to another page?
header()
And in new window?
Posted: Mon Mar 24, 2003 2:25 am
by twigletmac
Malder wrote:Do you mean redirecting to another page?
header()
And in new window?
Not possible using PHP - try looking for a JavaScript solution - opening new windows is a client-side function and PHP is server-side.
Mac