Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!--FILTRO FLUTUANTE -->
- <div id="mws-themer">
- <div id="mws-themer-hide"></div>
- <div id="mws-themer-content">
- <div class="mws-themer-section">
- <form action="" 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="button" onclick="submit()" class="mws-button red small" id="mws-themer-sendfilterPCD">Filtrar</button>
- </div>
- </div>
- </div>
- <script>
- function submit() {
- var fornDetails = "fornDetails.php";
- var fornRegister = "fornRegister.php";
- var result = "<?php paginaDestino($_POST["edtMFIR"]); ?>";
- alert(result);
- if (result) {
- myForm.action = fornRegister;
- } else {
- myForm.action = fornDetails;
- }
- myForm.submit();
- }
- </script>
- function paginaDestino($edtMFIR){
- $conexao = new bancodedados();
- if(!empty($edtMFIR)){
- $conexao->setSQL("SELECT * FROM tab_aro_pcd_riscos WHERE aro_riscos_mfir=".$edtMFIR." LIMIT 1");
- $res_a = $conexao->Consultar();
- $RES_MFIR = mysql_fetch_array($res_a);
- if(empty($RES_MFIR)){
- return false;
- }else{
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement