Page 1 of 1

Php Url adjustment

Posted: Wed Aug 20, 2008 10:32 am
by manels11
Hi I'm very noob with php but here's what I'm trying to do.

I have a webpage that contains an article called http://www.mytest.com/article1.txt.

When someone loads this page they are actually loading this code.

Code: Select all

<?php
if ($_REQUEST['showComments'] == true){
    echo '[include:/inc/header.php]';
}else{
    echo '[include:/inc/regular.php]';
}
?>
Which basically I have a two separate pages that load. One with comments on the article which is header.php and one without which is regular.php that has a link that looks like this.

Code: Select all

<a href="<?php echo $_SERVER['PHP_SELF']; ?>?showComments=true">Post/Read Comments</a>
So if a user loads the page for the first time they will be directed to regular.php. Which then if they want to read the comments they click the link above which sends them back through the initial page that then redirects them to header.php.

My delima is I'm is the link. I need the link they click to actually show

Code: Select all

<a href="<?php echo $_SERVER['PHP_SELF']; ?>?keepThis=true&TB_iframe=true&height=650&width=980">Post/Read Comments</a>
However I still want it to load up the header.php file because they have clicked the link to see the comments.

I hope this makes sense can anyone point me in the right direction?

Thanks in advance,

Josh

Re: Php Url adjustment

Posted: Wed Aug 20, 2008 10:34 am
by manels11
Forgot to mention this code [include:/inc/header.php] is a token from our content manegment system that basically just goes and grabs header.php and displays it.

Re: Php Url adjustment

Posted: Thu Aug 21, 2008 10:57 am
by manels11
Bump... Is it possible to do what I'm trying to do? or alot of coding?