仅在页面加载和表单提交期间执行存储过程

This is the scenario: I want to execute a MySQL stored procedure from a PHP page only on two events:

  1. Execute/CALL the sp the first time the page is loaded
  2. It will execute again after every time a form is submitted via POST

But it will NOT execute if the page is Refreshed (by clicking the refresh button in the browser).

The page is available to logged-in users only.

Can someone please suggest possible solutions to such a scenario?

I solved this by saving some SESSION variables and then checking those variables when the page is refreshed.