-1
Speak personally, then my problem is this, I have a PHP page that is my form and I have a PHP page to receive the information from the form and give the answer to the user, very simple thing. But I wanted the answer to the user to be inside the form page, when he sends the form, to appear inside a table inside the same page of the form, how do this?
<!DOCTYPE html>
<html lang="pt-br">
<head>
<title>lista de tarefas</title>
<meta charset="UTF-8">
<link rel="stylesheet" href="style.css">
</head>
<body>
<form>
<table id="tab">
<?php
$dat=isset($_GET["data"])?$_GET["data"]:"15/10/2019";
$tar=isset($_GET["tarefa"])?$_GET:"não informado";
$tab=$_GET["tab"];
echo "<tr><td>$tar</td><td>até $dat</td></tr>";
?>
</table>
</form>
</body>
</html>
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="utf-8">
<title>cadastro de tarefas</title>
</head>
<body>
<form method="GET" action="form.php">
<fieldset>
<legend>Crie Sua tarefa</legend>
<p><label>tarefa</label> : <input type="text" name="tarefa" ></p>
<p><label>conclusão</label> : <input type="date" name="data"></p>
</fieldset>
<input type="submit" value="Enviar">
</form>
</body>
</html>
I’ll see about AJAX, but I was able to resolve it ,I don’t know if in the right way. I switched to the POST method and deleted the action and is now giving the result I wanted, the more I liked AJAX, I will try to include in the project. Thank you!!
– Dayvid Mesquita