Basic query

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Assume that I have a simple page (page 2) with just one hyperlink to another
page (page 3)..
How can I add code to page 2 so that if it is called/displayed from a link
from another page (page 1) then the hyperlink on page 2 will be actioned
automatically, just as if it's link to page 3 had been manually selected?
The actual link on page 2 has to be actioned as it contains special PHP
I have been unable to get a satisfactory answer from the PHP groups.
I hope that my explanation is clear.
Brian Tozer

Re: Basic query

KiwiBrian wrote:
Quoted text here. Click to load it

Hi Brian,

Let me get this right.  You want to have it so you can click on a link on
page 1, and it will go straight to page 3, invisibly executing the php code
which is on page 2?  Is this some kind of outgoing link tracker?

If so try something like this: /

If that is what you meant, the example files are here:


Re: Basic query

Quoted text here. Click to load it

Hi Nik. Right around the world and back to
Thanks for the example.
I wish to have a "Today's Results" button on my Home Page.
The PHP that I want to implement on page 2 is:-

<a href="<?php echo date('l') ?>.html"</a>

In the same folder I have 7 files, named Monday.html,
In testing this seemed to work when the link was manualy selected with the
cursor/left click. The page for today would be output.
But I want the activating hyperlink to be on my site Home Page, but I don't
want to call my Home Page index.php
Hence the two step process so that the initial link goes to page 2 and
activates the above script there automatically.
Is that totally clear, and how does this fit into your previous reply?
BTW I am interested also in the subject of outgoing link tracking, and have
implemented it to one target site with this technique, but one subject at a
time........... lol
I really apreciate the help Nik.

Re: Basic query

Quoted text here. Click to load it

Nick, I implemented Method 2 using your php file and have it working
I was beginning to think it couldn't be done as everyone on the
comp.lang.php NG is telling me that I would have to rename my index.html to
index.php, or use javascript.....
I am so pleased.
I am so grateful.
I owe you one.
Brian Tozer

Site Timeline