How to get data from a modal page?

1

I have a main page with a simple form:

<div class="col-sm-6">
  <label for="tipo">Tipo de sessão:</label>
  <select class="form-control" name="tipo">
    <option value="1">opcao 1</option>
    <option value="2">opcao 2</option>
  </select>
</div>

<div class="col-sm-6">
  <label for="data">Data:</label>
  <input type="date" class="form-control" name="data" required>
</div>

<div class="col-sm-3">
 Funcionario
  <div class="card">
    <img class="card-img-top" src="..." alt="Funcionario">
    <div class="card-body">
      <h5 class="card-title">Funcionario</h5>
      <a href="#" class="btn btn-primary">Selecionar...</a>
    </div>
  </div>
</div>

I have another page that lists employee items:

    

while ($sessao = mysqli_fetch_assoc($result)){
  echo '<div class="media col-sm-6">
          <div class="media-body">
            <h2 class="mt-0">'.$sessao['nome'].'</h2>
            <a class="btn btn-primary" href="DEVERIA SELECIONAR AQUI.php?id='.$sessao['id'].'">Seleciona</a>
            <a class="btn btn-danger" href="deleteFlor.php?id='.$sessao['id'].'">Excluir</a>
          </div>
        </div>';
}
?>

How to make the first page open the second one (being a MODAL) and on the second page, when selecting the employee, it is displayed on the first screen?

I probably already have something like this here in the community, but as I do not know the name of this technique, I'm asking the question.

    
asked by anonymous 20.04.2018 / 22:51

0 answers