I'm trying to run a PHP function after submitting the page, but I have not been successful. Could someone help me?
<?php
function teste() {
?>
<div>
<p>
<?php echo "Foi clicado"; ?>
</p>
</div>
<?php
}
?>
<body>
<!--FILTRO FLUTUANTE -->
<div id="mws-themer">
<div id="mws-themer-hide"></div>
<div id="mws-themer-content">
<div class="mws-themer-section">
<form action="?a=ok" name="myForm" id="myForm" style="padding: 0; margin: 0;" method="POST">
<input type="text" name="edtMFIR" id="edtMFIR" value="" class="mws-textinput error">
</form>
</div>
<div class="mws-themer-separator"></div>
<div class="mws-themer-section">
<button type="submit" class="mws-button red small" id="mws-themer-sendfilterPCD">Filtrar</button>
</div>
</div>
</div>
<?php
if (isset( $_GET['a'] ) && $_GET['a'] == 'ok' && $_POST['texto'] != '') {
teste();
}
?>