I have the plugin PHP Everywhere activated in my Wordpress installation. I've figured out how to get PHP scripts running on page load (viewing a post) using a Gutenberg Block but now I'd like to run PHP when a user enters data into an input box and clicks a submit button.
eg. User enters "xyz" into the input box and clicks the command button "submit". Once submit is clicked, it sets $variable1 = "xyz"; and then compares whether $variable1 == $variable2 (a string) or not.
Actually I'd like to compare whether "xyz" is anywhere in the string $variable2 (eg. "tuvwxyz") rather than exactly "xyz".
I am trying to do all of this within the Wordpress editor, not with external .php files located on my FTP.