using $_SESSION to query table


i have spry menu has 2 levels.

 

level 1 has title of "1960's", "1970's", ext way "2000's"

 

the second level has years 1961,1962,1963, ext.

 

in table have football scores of high school.  each line  has year in it.  1963, town, score, opponent, score

 

when user chooses year, want populate data set year user chooses.

 

this line 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" page display results.

 

if user chooses 1980, results appear 1981,  last one.  if add line had 1982, display 1982 scores.

 

i need keep varable "yearp" value user chooses , display year.

 

i'm new please bare me.

 

any ideas?

 

larry

hi larry,

 

there no need session variables. if want filter data can use url variable year=1960 or similar. in results page can use php filter data year.

 

i assuming using htmldatasets show results table created in results page.

 

your link <a href="results.php?year=1960">, in results page have filter where year=$_get['year'] or similar.

 

if need further assistance please post code results page.

 

ben



More discussions in Develop server-side applications in Dreamweaver


adobe

Comments

Popular posts from this blog

CS5 Adobe Media Encoder: Encode failed because the source duration is nil.

cf_sql_integer vs cf_sql_bigint vs cf_sql_int??

localhost/joomla15/administrator doesnt work - Joomla! Forum - community, help and support