How do I do it so that when I click the Reply button instead of taking me directly to the reply.php page, I temporarily store the data so I can quote more than one response by clicking on the reply button of different comments and taking me finally to the page reply.php where I can play with that data? With the code I have now I can only quote one person, I have no idea how to do it to quote more than one at a time.
<form action="../reply.php" method="POST">
<input type="hidden" name="usuarioID" value="' . $u_id . '">
<input type="hidden" name="mensaje" value="' . $mensaje . '">
<button name="reply" type="submit">Responder</button>
</form>
reply.php
$usuario = mysqli_real_escape_string($connection, $_POST['usuarioID']);
$mensaje = mysqli_real_escape_string($connection, $_POST['mensaje']);
<form method="POST" action="' . replyComments($connection) . '">
<input type="hidden" name="usuario_respuesta" value="' . $_SESSION['u_id'] . '">
<input type="hidden" name="usuario" value="' . $usuario . '">
<input type="hidden" name="mensaje" value="' . $mensaje . '">
<textarea name="texto">
<span class="cita">De ' . $usuario . ': ' . $mensaje .'</span>
</textarea>
<button type="submit" name="submit">Enviar respuesta</button>
</form>
The function only makes it possible to collect the input and textarea data and register them in the database through an INSERT INTO.