Newbie Session question

[email protected] ("Chris Gray")
Newsgroups php.version4
Message-ID <008d01bfc8b6$ba201110$5bb47218@cr698724a>
I am building some arrays and hyperlinks inside a loop

while($row = mysql_fetch_array($result)) {
        $SApID[$n] = $pID;
        etc.
        <a href="javascript:picker(<?=$n?>)"><?=$category?></a></font></td>
        etc.
}

Can anyone suggest how to stuff the appropriate array value into a single
session array variable when a hyperlink is clicked?

I want to use something like

<SCRIPT LANGUAGE="JavaScript">
function picker(...$n...) {
        $SESSION["pID"] = $SApID[$n];
        etc.,   plus a redirect

but this will obviously never fly and as you can see my Javascript knowledge
is extremely basic.
Maybe there is a better way?  It must be a single value session solution.
Yes, I tried looking through the archives.  8=)
Thanks,
Chris
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.