Basic query

N

Nik Coughin

KiwiBrian said:
Hi Nik. Right around the world and back to NZ.........lol
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>

Try <?php header('Location: '.date('l').'.html') ?>

Just that in the page2.php file, nothing else.

H2H
 
N

Nik Coughin

K

KiwiBrian

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
code.
I have been unable to get a satisfactory answer from the PHP groups.
I hope that my explanation is clear.
TIA
Brian Tozer
 
N

Nik Coughin

KiwiBrian said:
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 code.
I have been unable to get a satisfactory answer from the PHP groups.
I hope that my explanation is clear.
TIA
Brian Tozer

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:
http://nrkn.com/kiwiBrian/

If that is what you meant, the example files are here:
http://nrkn.com/kiwiBrian/kiwiBrian.zip

Cheers.
 
K

KiwiBrian

Nik Coughin said:
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:
http://nrkn.com/kiwiBrian/

If that is what you meant, the example files are here:
http://nrkn.com/kiwiBrian/kiwiBrian.zip

Hi Nik. Right around the world and back to NZ.........lol
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,
Tuesday.html..................Sunday.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.
Cheers
Brian
 
K

KiwiBrian

Nik Coughin said:
That's method 1. You can see it at the url above.
http://nrkn.com/kiwiBrian/ and download the files at
http://nrkn.com/kiwiBrian/kiwiBrian.zip

A more concise way to do it would be <?php include(date('l').'.html') ?>

You can see it at http://nrkn.com/kiwiBrian/2/ and download it at
http://nrkn.com/kiwiBrian/2/kiwiBrian.zip

Nick, I implemented Method 2 using your php file and have it working
perfectly!!!!
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.
Cheers
Brian Tozer
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top