Unlink functions from 'buttons' in PHP

2

I would like to unlink the buttons, I have a button generate password and a call, but every time I generate a password, it also calls, would like to unlink these buttons, could anyone help me please?

  <?php
  echo "<form>";
  echo "<button> Gerar senha</button>";
  echo "</form>";
  $letras = range('A', 'Z');
  $numeros = range(1, 9);
  shuffle($letras);
  shuffle($numeros);
  $senha = implode('', array_slice($letras, 3, 3)) . '-' . 
  end($numeros);
  $file = 'senhas.txt';
  if (!$handleFile = fopen($file, "a+")) {
  die("<p>Erro ao abrir/criar o arquivo: (<b>$file</b>) 
  </p>");
  }
  fwrite($handleFile, $senha . "\r\n");
  fclose($handleFile);
  $arr = (file_get_contents($file));
  echo '<pre>';
  print_r($arr);
  echo '</pre>';
  echo "<hr>";
  ?>
  <?php
  echo "<form>";
  echo "<button> Chamar senha</button>";
  echo "</form>";
  print_r("Senha $senha dirija-se ao caixa de atendimento");
  ?>
    
asked by anonymous 10.11.2018 / 14:53

0 answers