ColdH4x Posted February 24, 2007 Share Posted February 24, 2007 Hi! I'm new to this forum... and after a couple of days trying and searching, I think I just can't solve my problem... What I need is very simple. I just need to retrieve a page when a menu is clicked. So, i got the code, but I got sort of 3 problems. 1 - When using fopen() it returns a blank page... 2 - When using include() it includes me the new page at the bottom of the actual opened page... i don't want that 3 - When using cURL (and thought i had the problem solved) it gave me the same problem that i got when using include(), the new page appears at the bottom of the current opened page... I just want the page to be retrieved and to be the only showed... nothing more nothing less... Hope I can get some help! (And sorry my bad English) Thanks in advance! Link to comment https://forums.phpfreaks.com/topic/39954-help-retrieving-page/ Share on other sites More sharing options...
magic2goodil Posted February 24, 2007 Share Posted February 24, 2007 try header("Location: mypage.php"); if that doesn't work try javascript and do a location.href="mypage.php" Link to comment https://forums.phpfreaks.com/topic/39954-help-retrieving-page/#findComment-193178 Share on other sites More sharing options...
ColdH4x Posted February 25, 2007 Author Share Posted February 25, 2007 Thanks! The header() kinda solved my problem... Now the only thing is... I'm using that method of linking pages with "www.example.com/example?variable=something" but when I link to a page using header() instead of showing in the URL "?example=something", it shows the full path to the file, like "/home.html"... Can I make it only show that "?example=something" instead of the full path to the file? Thanks! Link to comment https://forums.phpfreaks.com/topic/39954-help-retrieving-page/#findComment-193320 Share on other sites More sharing options...
superuser2 Posted February 25, 2007 Share Posted February 25, 2007 Header is the way to go. If you want to add the query string: header("Location: otherpage.php?" . $_SERVER['QUERY_STRING']); This will redirect you to otherpage.php with everything after the ? the same as it was on whatever page that code is in. Link to comment https://forums.phpfreaks.com/topic/39954-help-retrieving-page/#findComment-193336 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.