I have changed my controller abit according to your advice
*CODE:*
def echo():
session.name=request.vars.name
return 'Welcome, ', session.name
& in view 2 and other views i simply add {{=session.name}} and i get what I
want, it works & i hope the semantics of how i used session are ok
*VIEW 2*
<h3>LESSON 1 QUIZ 2</h3><span><a href="javascript: history.back()">BACK</a>
| <a href="javascript:history.go(0);">TEST AGAIN</a></span> | <a href=
"lesson1quiz3.html">NEXT QUIZ</a>
</header>
<div id="target" class="target" style="float: right; color: #1f8f7b;
font-weight: bold;">
Welcome, {{=session.name}}
</div>
Thanks Val K
On Saturday, December 29, 2018 at 4:27:01 PM UTC+2, Val K wrote:
>
> There is the 'session' that is storage for common needs like this, so you
> can session.user_name = request.vars.name in the first controller and
> then use it in other to retrieve user_name
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.