Jump to content

Recommended Posts

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&amp;showcomments=1&amp;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
Link to comment
https://forums.phpfreaks.com/topic/30626-2-questions-regarding-php/
Share on other sites

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&amp;showcomments=1&amp;id=$id" [b]target="frame_name"[/b]>$subject[/url]
<span class="pa">Geplaatst op $time</span>[/quote]

Regards
Huggie
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.
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.

Regards
Huggie
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.