HHawk Posted December 14, 2006 Share Posted December 14, 2006 Hi guys,I have 2 questions and hopefully you can answer them both. :)[b]As for question 1:[/b]I currently use the following code to get content displayed in a selected area.[code]<?php if ( isset($HTTP_GET_VARS['nieuws'])) {include('nieuws.php'); }else if ( isset($HTTP_GET_VARS['directhosting'])) {include('overons.php'); }else if ( isset($HTTP_GET_VARS['netwerk'])) {include('netwerk.php'); }else if ( isset($HTTP_GET_VARS['overzicht'])) {include('overzicht.php'); }else if ( isset($HTTP_GET_VARS['koper'])) {include('koper.php'); }else {include('overons.php');} ?>[/code]But someone pointed out that this PHP coding is outdated ($HTTP_GET_VARS) and I should just use the "GET" command or something?Is it easy to replace the current coding (like above) with the updated PHP code? If yes, can someone please give me an example?[b]As for question number 2:[/b]As you can see I use the coding from above to call on several pages to display it in the correct place (which would not work with iframe-crap), 99% works without problems, but for some reason the only thing which does not work like this, is my news archives. I use PHPnews, I understand it's a script which does not come from here, but I would still like some help.It currently only opens a selected archived message in a blank page, while I want it to appear in the selected place on my website's layout. There is a file, which I think is the one I need to modify or something: link_temp.php.It contains the following code:[quote]<a href="news/news.php?action=fullnews&showcomments=1&id=$id"><b>$subject</b></a><br /><span class="pa">Geplaatst op $time</span><br /><br />[/quote]How can I force it to open in my current webpage layout (instead of opening it in a blank page)?Thanks for your time.../edit typos Quote Link to comment https://forums.phpfreaks.com/topic/30626-2-questions-regarding-php/ Share on other sites More sharing options...
HuggieBear Posted December 14, 2006 Share Posted December 14, 2006 In answer to question 1, yes extremely...[code]<?php if ( isset($_GET['nieuws'])) {include('nieuws.php'); }else if ( isset($_GET['directhosting'])) {include('overons.php'); }else if ( isset($_GET['netwerk'])) {include('netwerk.php'); }else if ( isset($_GET['overzicht'])) {include('overzicht.php'); }else if ( isset($_GET['koper'])) {include('koper.php'); }else {include('overons.php');} ?>[/code]As for question 2, I'm not sure how I frames work, but if they're the same as normal frames then you just need to specify the target...[quote]<a href="news/news.php?action=fullnews&showcomments=1&id=$id" [b]target="frame_name"[/b]>$subject[/url]<span class="pa">Geplaatst op $time</span>[/quote]RegardsHuggie Quote Link to comment https://forums.phpfreaks.com/topic/30626-2-questions-regarding-php/#findComment-141038 Share on other sites More sharing options...
HHawk Posted December 14, 2006 Author Share Posted December 14, 2006 Thanks for answering question 1. I will give that a go.It won't give me any problems when I change the code right?As for question number 2. Well I don't use iframe's at all, maybe you understood me wrong...Anyways is it possible to show / make it work like the coding I posted at question 1?So it displays the archives where I want it to...Thanks again for taking the time to answer my questions. Quote Link to comment https://forums.phpfreaks.com/topic/30626-2-questions-regarding-php/#findComment-141048 Share on other sites More sharing options...
HuggieBear Posted December 14, 2006 Share Posted December 14, 2006 It shouldn't give you any issues. As for question 2, yes I misunderstood.You could use an include I suppose but that might not work exactly as intended. It depends on what else is on the page. This is likely to need more customizing.RegardsHuggie Quote Link to comment https://forums.phpfreaks.com/topic/30626-2-questions-regarding-php/#findComment-141050 Share on other sites More sharing options...
HHawk Posted December 14, 2006 Author Share Posted December 14, 2006 Anyone else with a possible solution to question number 2? Cause I can't figure it out. :( Quote Link to comment https://forums.phpfreaks.com/topic/30626-2-questions-regarding-php/#findComment-141218 Share on other sites More sharing options...
HHawk Posted December 15, 2006 Author Share Posted December 15, 2006 * bump *Do I need to post a part of the code or something?If so, that's not a problem. I just want to be able to open the archives in the current layout. :S Quote Link to comment https://forums.phpfreaks.com/topic/30626-2-questions-regarding-php/#findComment-141706 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.