More help with eruby

P

peter

Hi list
I really hate to ask for help and it seems that the simplest things are
stumping me :(

I'm trying to create a dynamic menu where a var is passed to expose the
next section based on the link used like my example below. My question
is what do I use to capture the y variable?

<ul>
<li><a href="?y=2006">2006</a></li>
<li><a href="?y=2007">2007</a></li>
</ul>

<%
year = ??????
if year == 2006
printf "<li><a href=\"/2006/?s=help\">Help</a></li><li><a href=
\"/2006/?s=upload\">Upload</a></li><li><a href=\"?/2006/s=download
\">Download</a></li>"

elsif year == 2007
printf "<li><a href=\"/2007/?s=help\">Help</a></li><li><a href=
\"/2007/?s=upload\">Upload</a></li><li><a href=\"/2007/?s=download
\">Download</a></li>"
end
%>

Thanks in advance for any help you can provide.

Peter
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,234
Messages
2,571,180
Members
47,813
Latest member
RustyGary3

Latest Threads

Top