$post[userid] is a variable that only exists when you're dealing with posts in threads. Hense the "post" part of the variable name. Try using the
$userinfo[userid] for the memberinfo template instead.
Your code should be:
Code:
<br><div class="smallfont"><a class="smallfont" href="stockts.php?$session[sessionurl]u=$userinfo[userid]">Portfolio</a></div>
Also, use the [code][/code] bbcode tags when you share code with people in the future