This topic is locked
[SOLVED]

Get current Page link

5/13/2024 10:23:34 AM
PHPRunner General questions
P
PK author

Hello,
I have a custom delete button which I intend to place on several pages instead of creating a different one for each page. My idea is to get the page name when the button is clicked so I that I know which table to delete from and what other action I need to take.

So my question is how to get the current page name or link: for example:

$currPage=getCurrentPageLink(myCurrentPage);

Thank you

M
MikeT 5/13/2024

There are the 2 built in fucntions getFileNameFromURL() and getFileWoExtension()

You can e.g. combine it: getFileWoExtension( getFileNameFromURL() ) etc.