0
I have a system that has two possibilities of use for the user:
1.manual
2.automatica
wanted the user to be able to choose between these two versions in the style input type='radio'
. So just updating the page with the content the customer chose (manual or automatic)
<body id="body">
<div id="DivTopo">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<?php
include "TopoLogado.php";
?>
</div>
<div>
<form action="Atividade.php">
<INPUT TYPE="RADIO" NAME="OPCAO" VALUE="1">Kanban Automático
<INPUT TYPE="RADIO" NAME="OPCAO" VALUE="2">Kanban Manual
<input type="submit" value="atualizar">
</form>
</div>
</div>
</div>
</div>
<div id="DivCentral"><br>
<h1 class="Titulo">Tarefas de <?php echo $tblDetalhes['nome_ATIVIDADE'] ?></h1>
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<?php
if($_POST["OPCAO"]==1 ){
include 'KANBAN1.php';
} else if ($_POST["OPCAO"]==2){
include 'KANBAN2.php';
}
?>
<div id="DivRodape">
<?php include "Rodape.php"; ?>
</div>
</div>
</div>
</div>
</div>
<script>
<?php
include "./JavaScript/Modal.js";
?>
</script>
</body>
I thought I’d do it that way too:
<div class="pre-spoiler">
<input id="xs" value="Leia Mais" style="margin-left: 50px; padding: 0px; width: 80px; " onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';this.innerText = ''; this.value = 'Ocultar'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.value = 'Leia Mais';}" type="button"> </div>
<div>
<div class="spoiler" style="display: none;">
<?php include 'KANBAN1' ?>
</div>
</div>
But the first one works, but the second one doesn’t (the same content of the first one appears)
Please post the code you have to supplement your question. This makes it easier for the community to help.
– user98628
@Pauloimon ready
– user99595
Wouldn’t just set up your
<form>
to send the values byPOST
to that same page? You are already making the condition with the received values. I don’t understand what your difficulty is.– user98628
is not working
– user99595
Place:
<form action="" method="post">
and testing.– user98628
@Pauloimon opa, that’s right +1 for your comment.
– Guilherme Nascimento
Good! Needing we are there.
– user98628