PHP to execute hyperlink?
| From: | Jack Gates | Date: | Tue, 14 Sep 2004 22:56:35 +0000 |
| Subject: | PHP to execute hyperlink? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-196664@lists.php.net to get a copy of this message | ||
I use an application that has a web browser engine built in and every time I
open the app there is some code executing a hyperlink and pulling up a HTML
page to a specific place on the page. This action changes according to if it
is AM or PM and the date.
Example: from 00:00 to 11:59 during the same day you will see the same
starting place on the page any time this app is opened. From 12:00 to 23:59
during the same day you will see something different from the AM but it will
be the same for the 12 hour time period. The next day the AM section and the
PM do the same thing but on a different place on the page. Each day this
behavior repeats but each day the place on the page is new.
The page that is called has name anchors through out the page. It is these
name anchors that are being called on the page.
I said all that to ask this.
I want to do the same thing using PHP script. Can this be done? I know PHP
is server side script.
I am not sure which date/time function to use. I assume that "if else"
statements will be needed. I don't know how to get PHP to execute the
hyperlink when the page opens.
Basically the PHP code would execute something like this:
Get the current date and time, find the matching name anchor that reflects the
current month and day and if it is AM or PM and then display the correct
place on the page.
I am still learning PHP so this as been a little more than I can figure out
right now. Just trying to figure out how to use all the date time functions
is confusing. I do know how to use date() that one was easy to figure out.
I don't know if I should be using date() or getdate()
If I could figure out the start and end of the script I could probably figure
this out. I think the middle with the "if else" statements will be easy to
figure out.
Every time I try to figure out these date time functions I get syntax errors.
I can't figure out what the PHP manual says about these functions.
Any body have any ideas?
Thanks,
--
Jack "The Rhino" Gates, Registered Linux user #342662
Morning Star Communications, www.morningstarcom.net
Web Hosting, Site Design, Domain Registration,
VMware Workstation Software and GSX Server Software