Plugin Environment Function checkPostIsMine()

public final function checkPostIsMine()

Summary

This function checks whether there is data in the $_POST array, and whether that data is from a form created by the current Plugin (as opposed to data from another Plugin on the current page).

Where You Can Use It

Can be used in methods called by plugins. From Zenario 7.0.0 onwards.

Description

Where you have more than one Plugin on the same page that listens for a $_POST request, you have the possibility that there may be a name clash between $_POST variables. The problem is worst when two Plugins are from the same Module, when the variable names will almost certainly clash.

To work around this problem, you should use the openForm() function to open any forms you have on your Plugin, then call the checkPostIsMine() function when dealing with the $_POST request, to see if the $_POST is actually from the current Plugin instance.