Hi master,
how to encrypt url for edit page or view data etc in PHPMaker v2024.14?
Thanks
encrypt url for edit page or view data etc.
-
- User
- Posts: 73
encrypt url for edit page or view data etc.
-
- User
- Posts: 11905
You may protect the certain record based on your own business-logic by using Row_Selected server event.
-
- User
- Posts: 73
I tried with the following code,
$my_id = $rs["id_brand"];
if ($rs["id_brand"] != $my_id && CurrentPageID() == "edit") {
$this->terminate("brandlist");
}
how to make $rs["id_brand"] with $my_id value detected as manually changed in url by user?
is there a way that I don't know?
if I change the value of $my_id and specify the value manually the code runs well:
if ($rs["id_brand"] != "1" && CurrentPageID() == "edit") {
$this->terminate("brandlist");
}
-
- User
- Posts: 11905
That Row_Selected server event is not for that. As its name said, this event will be fired after a row is selected, and not when a row is updating.
If you want to prevent the record to be updated based on your own business logic, then you should use Row_Updating server event.