My HTML form submits the data to a php form. I was wondering if I could "save" the data in the php form so whoever opens it can see the data. Atm, if I open "action.php" from a different computer I see "hi you are 0 years old"
Here's the code
Code:
<html>
<head> </head>
<title> Form </title>
<body>
<form action="action.php" method="post">
<p> your name: <input type="text" name="name" /> </p>
<p> your age: <input type="text" name="age" /> </p>
<p> <input type="submit" /> </p>
</form>
</body>
</html>
Code:
hi <?php echo htmlspecialchars($_POST['name']); ?>
you are <?php echo (int)$_POST['age']; ?> years old