Php Url adjustment
Posted: Wed Aug 20, 2008 10:32 am
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.
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.
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
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
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]';
}
?>Code: Select all
<a href="<?php echo $_SERVER['PHP_SELF']; ?>?showComments=true">Post/Read Comments</a>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>I hope this makes sense can anyone point me in the right direction?
Thanks in advance,
Josh