Basic query

Discussion in 'HTML' started by Nik Coughin, May 30, 2005.

  1. Nik Coughin

    Nik Coughin Guest

    KiwiBrian wrote:
    > "Nik Coughin" <nrkn!no-spam!@woosh.co.nz> wrote in message
    > news:0kPme.4171$...
    >> KiwiBrian wrote:
    >>> 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?

    >>
    >> try something like this:
    >> http://nrkn.com/kiwiBrian/

    >
    > 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
     
    Nik Coughin, May 30, 2005
    #1
    1. Advertising

  2. Nik Coughin

    Nik Coughin Guest

    Nik Coughin wrote:
    > KiwiBrian wrote:
    >> "Nik Coughin" <nrkn!no-spam!@woosh.co.nz> wrote in message
    >> news:0kPme.4171$...
    >>> KiwiBrian wrote:
    >>>> 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?
    >>>
    >>> try something like this:
    >>> http://nrkn.com/kiwiBrian/

    >>
    >> 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


    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

    Cheers
     
    Nik Coughin, May 30, 2005
    #2
    1. Advertising

  3. Nik Coughin

    KiwiBrian Guest

    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
     
    KiwiBrian, May 31, 2005
    #3
  4. Nik Coughin

    Nik Coughin Guest

    KiwiBrian wrote:
    > 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.
     
    Nik Coughin, May 31, 2005
    #4
  5. Nik Coughin

    KiwiBrian Guest

    "Nik Coughin" <nrkn!no-spam!@woosh.co.nz> wrote in message
    news:0kPme.4171$...
    > KiwiBrian wrote:
    >> 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


    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
     
    KiwiBrian, May 31, 2005
    #5
  6. Nik Coughin

    KiwiBrian Guest

    "Nik Coughin" <nrkn!no-spam!@woosh.co.nz> wrote in message
    news:WBQme.4196$...
    > Nik Coughin wrote:
    >> KiwiBrian wrote:
    >>> "Nik Coughin" <nrkn!no-spam!@woosh.co.nz> wrote in message
    >>> news:0kPme.4171$...
    >>>> KiwiBrian wrote:
    >>>>> 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?
    >>>>
    >>>> try something like this:
    >>>> http://nrkn.com/kiwiBrian/
    >>>
    >>> 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

    >
    > 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
     
    KiwiBrian, May 31, 2005
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    6
    Views:
    3,386
    Steven Cheng[MSFT]
    Jun 29, 2005
  2. KiwiBrian

    Basic CSS query

    KiwiBrian, Jul 11, 2003, in forum: HTML
    Replies:
    4
    Views:
    510
    Leif K-Brooks
    Jul 12, 2003
  3. Brian Tozer

    Basic query

    Brian Tozer, Oct 4, 2003, in forum: HTML
    Replies:
    2
    Views:
    431
    Brian Tozer
    Oct 5, 2003
  4. Engineer
    Replies:
    6
    Views:
    671
    Jeremy Bowers
    May 1, 2005
  5. Replies:
    0
    Views:
    473
Loading...

Share This Page