lulon83 Posted July 29, 2008 Share Posted July 29, 2008 I need help please. I have one page on which I have an <a href="control.php"> In control.php I have to do some "things" with the datas and the database, and then I have to redirect to the <a href>. This is what I though: first_page <a href="control.php?link=www.google.com">google</a> control.php ...control of the data... Header My question is, how do I have to do the header? Any other solution? Thank you. Quote Link to comment https://forums.phpfreaks.com/topic/117160-a-href-with-header/ Share on other sites More sharing options...
GingerRobot Posted July 29, 2008 Share Posted July 29, 2008 I'm not sure i follow? You wish to redirect to www.google.com (in your example) at the end of control.php? header("location:http://".$_GET['link']); Quote Link to comment https://forums.phpfreaks.com/topic/117160-a-href-with-header/#findComment-602576 Share on other sites More sharing options...
lulon83 Posted July 29, 2008 Author Share Posted July 29, 2008 Ok, thank you very much, it was I needed. Other question: How can I open the new window in a different window. I mean: I have the main page "page.php", then I have "control.php" and then I call "googlehtml" for example. How can I have two differents pages, one, "page.php" and the other one "googlehtml". Thank you. Quote Link to comment https://forums.phpfreaks.com/topic/117160-a-href-with-header/#findComment-602615 Share on other sites More sharing options...
DeanWhitehouse Posted July 29, 2008 Share Posted July 29, 2008 target="_blank" put that in the anchor tag <a href="" target="_blank"></a> Quote Link to comment https://forums.phpfreaks.com/topic/117160-a-href-with-header/#findComment-602618 Share on other sites More sharing options...
lulon83 Posted July 29, 2008 Author Share Posted July 29, 2008 But it has to be in the "control.php", so it has to be in the header. How can I do it? Quote Link to comment https://forums.phpfreaks.com/topic/117160-a-href-with-header/#findComment-602622 Share on other sites More sharing options...
scottybwoy Posted July 29, 2008 Share Posted July 29, 2008 <a href="control.php?link=www.google.com" target="_blank">google</a> I think thats what you want Quote Link to comment https://forums.phpfreaks.com/topic/117160-a-href-with-header/#findComment-602623 Share on other sites More sharing options...
DeanWhitehouse Posted July 29, 2008 Share Posted July 29, 2008 erm, why does it? the header will redirect automatically when the new page loads Quote Link to comment https://forums.phpfreaks.com/topic/117160-a-href-with-header/#findComment-602626 Share on other sites More sharing options...
lulon83 Posted July 29, 2008 Author Share Posted July 29, 2008 That's it. You are a genious. Thank you very much!! Quote Link to comment https://forums.phpfreaks.com/topic/117160-a-href-with-header/#findComment-602628 Share on other sites More sharing options...
DeanWhitehouse Posted July 29, 2008 Share Posted July 29, 2008 Is that not what i put ??? Quote Link to comment https://forums.phpfreaks.com/topic/117160-a-href-with-header/#findComment-602634 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.