1
I’m trying to run a PHP function after the page’s Ubmit, but I haven’t been succeeding. 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();
}
?>