My HTML form submits data to a php form and the php form displays it.
I was wondering if I could "save" the data in the php form so whoever
opens it can see the data. At the moment, if I open "action.php" from
a different computer or browser I see "hi you are 0 years old"

Here's my HTML & PHP form -

<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>

PHP form -

hi <?php echo htmlspecialchars($_POST['name']); ?>
you are <?php echo (int)$_POST['age']; ?> years old

Thanks.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to