Page 1 of 1

Store current record ID as a variable

Posted: 2022-11-01 17:57
by rpierce
Hello,

I have created a dashboard to illustrate information from my database. I want to limit the dashboard to show records from the currently selected "Project". If a user is viewing AppGini records from a project I would like to have a button that opens the dashboard filtered to the currently selected project. I can see the "Project Id" ** localhost/diary/hooks/dash.php?project_id=51** in the browser address bar, but how can I get that into a variable for use in a query?

Thank you for any help,

Ray

Re: Store current record ID as a variable

Posted: 2022-11-01 18:16
by jsetzer
Include lib.php, then:

Code: Select all

$pid = (string)Request::val('project_id', '');