PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
Malder
Forum Newbie
Posts: 13 Joined: Wed Mar 19, 2003 11:09 pm
Post
by Malder » Sun Mar 23, 2003 12:06 am
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!
hob_goblin
Forum Regular
Posts: 978 Joined: Sun Apr 28, 2002 9:53 pm
Contact:
Post
by hob_goblin » Sun Mar 23, 2003 1:14 am
you can't have a period in a variable name.
volka
DevNet Evangelist
Posts: 8391 Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger
Post
by volka » Sun Mar 23, 2003 2:03 am
and for your second question:
<a href="url" target="windowname" >
Malder
Forum Newbie
Posts: 13 Joined: Wed Mar 19, 2003 11:09 pm
Post
by Malder » Sun Mar 23, 2003 5:29 am
i meant how to open url in new window in PHP and not in broyzer
Malder
Forum Newbie
Posts: 13 Joined: Wed Mar 19, 2003 11:09 pm
Post
by Malder » Sun Mar 23, 2003 6:13 am
hob_goblin wrote: you can't have a period in a variable name.
then how to send url_name via "get"?
twigletmac
Her Royal Site Adminness
Posts: 5371 Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK
Post
by twigletmac » Sun Mar 23, 2003 6:22 am
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
twigletmac
Her Royal Site Adminness
Posts: 5371 Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK
Post
by twigletmac » Sun Mar 23, 2003 6:27 am
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
Malder
Forum Newbie
Posts: 13 Joined: Wed Mar 19, 2003 11:09 pm
Post
by Malder » Sun Mar 23, 2003 10:58 pm
Do you mean redirecting to another page?
header()
And in new window?
twigletmac
Her Royal Site Adminness
Posts: 5371 Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK
Post
by twigletmac » Mon Mar 24, 2003 2:25 am
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