encrypt url for edit page or view data etc.
Hi master,
how to encrypt url for edit page or view data etc in PHPMaker v2024.14?
Thanks
Hi master,
how to encrypt url for edit page or view data etc in PHPMaker v2024.14?
Thanks
Currently, there is no such feature.
is there another way?
because user can easily change ID 4 to 5 at the end of the url like this example http://localhost/cust/productsedit/4
You may protect the certain record based on your own business-logic by using Row_Selected server event.
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");
}
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.