Hi
Trying to build a MYSQL query on a table to return data where the username = $SESSION_NAME, is this possible within wappler?
so something like IF ‘username’ = ($_SESSION[‘username’]).
Tried adjusting the syntax to include{} and{{}} around ($_SESSION[‘username’]) but nothing.
Any idea anyone?
I works outside of Wrappler as normal code though?
If you have already created your session all you need to do is add it as a Global variable (as a session) to your Server Actions Globals. Then use (select) this session variable to filter your result set accordingly.
For any other session variable, which you want to use (generated by some other script on the page) - just add it under Globals > $_SESSION of your server action file, it will then be accessible in the data picker.