Click to See Complete Forum and Search --> : Trying to understand DATE= in links
yodasw16
02-09-2006, 01:38 PM
Can someone please tell me how these links know where to point to?
http://www.king.org/nowplaying/Schedule.asp?DATE=TODAY
http://www.king.org/nowplaying/Schedule.asp?DATE=CALENDAR
http://www.king.org/nowplaying/Schedule.asp?DATE=20060208
How does the DATE= locate the correct file? Is there something in the file that Date= reads?
Please help!!
Dave
ErolinDesigns
02-09-2006, 01:46 PM
The page looks at the querystring i.e. date.
Based on that string, it does a function. I can't really tell you what it does unless I have the real source, and not the generated source.
felgall
02-09-2006, 03:13 PM
You need to see the ASP code to see what it does with the value that is passed. You can't see that for other people's sites as that code runs on the server before the generated page is delivered.
yodasw16
02-10-2006, 02:39 PM
Is it possible to use querystrings without using ASP? My website is hosted on a unix server so I can't use asp.
welsh
02-10-2006, 02:49 PM
u can use php
yodasw16
02-10-2006, 03:48 PM
any chance you can tell me how to do that. I want to click a link and have it bring up a file based on the current date so that the correct days data is displayed on the day the link is clicked.
I just went through the php tutorial at w3schools.com and found the "fopen" function. Is there a way to use the function to open the file based on the date?
NogDog
02-10-2006, 03:54 PM
If you have a link like...
<a href="http://www.site.com/page.php?DATE=TODAY>Select Today</a>
...then in page.php you'll be able to reference the value "TODAY" via the $_GET array, e.g.:
echo "<p>You selected " . $_GET['DATE'] . " for the date</p>";