0
I have a certain input
of type submit
that when clicking acts on a pagina.php
. I wanted you to do this, but when you clicked it didn’t change the page, but act on this one pagina.php
.
HTML:
<html>
<form method="post" action="inserir.php">
<input type="submit" value="Enviar!">
</form>
</html>
PHP:
<?php
$link = mysqli_connect("localhost", "root", "vertrigo", "csgodouble");
$contador = "0";
while($contador < 10000){
$contador++;
$numero = rand(0, 14);
$sql = mysqli_query($link, "INSERT INTO apostas (numero_sorteado, hash, data_f, status) VALUES ('$numero', '0', '0', '0')");
}
?>
Already tried using Ajax?
– Vinicius Zaramella
I have no knowledge of ajax.
– Gonçalo
To be able to make a request to the server and act on the existing screen without updating the page it is necessary to use ajax. If you could put a piece of form code you are sending and how your php is getting it would be easier to help solve your problem.
– Vinicius Zaramella
I edited the question Vinicius.
– Gonçalo
You use jQuery or pure javascript?
– Vinicius Zaramella
How to give it more power Vinicius, for me it is indifferent.
– Gonçalo