Copy link to clipboard
Copied
i have a spry menu that has 2 levels.
level 1 has a title of "1960's", "1970's", ext all the way to "2000's"
the second level has the years 1961,1962,1963, ext.
in a table i have all the football scores of my high school. each line has the year in it. 1963, town, score, opponent, score
when the user chooses a year, i want it to populate my data set with the year that user chooses.
this is a line from the spry menu.
<li><?php session_id(); $HTTP_SESSION_VARS["yearp"]=1980; ?><a href="all scores.php">1980</a></li>
<li><?php session_id(); $HTTP_SESSION_VARS["yearp"]= 1981;?><a href="all scores.php">1981</a></li>
"all scores.php" is the page that will display the results.
if the user chooses 1980, the results appear from 1981, which is the last one. if i were to add another line that had 1982, it would display 1982 scores.
i need it to keep the varable "yearp" value the user chooses and then display that year.
i'm new to this so please bare with me.
any ideas?
Larry
Copy link to clipboard
Copied
Hi Larry,
There is no need for session variables. If you want to filter the data you can use a URL variable like year=1960 or similar. Then in the results page you can use PHP to filter the data to that year.
I am assuming that you are using HTMLDataSets to show the results from a table created in the results page.
Your link will look like <a href="results.php?year=1960">, then in the results page you will have a filter where year=$_GET['year'] or similar.
If you need further assistance please post the code for the results page.
Ben
Copy link to clipboard
Copied
i'm using a dynamic table on the all scores.php page to display the results. not sure if this makes a difference.
i am using dreamweaver and built the dataset with the wizard.
Copy link to clipboard
Copied
i'm using a dynamic table on the all scores.php page to display the results. not sure if this makes a difference.
i am using dreamweaver and built the dataset with the wizard.
This is the perfect scenario.
Just one remark, when you name your files, do not use a space as in all scores.php ; use all_scores.php instead.
I hope this helps.
Ben
Copy link to clipboard
Copied
thanks ben it worked perfect.
again thanks
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more