On h, 2007-02-12 at 21:04 +1100, Chris Henderson wrote:
> 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"

you have to store the data somewhere
- a DB
- a separate file
- or even you could rewrite the original "action.php" file but that
seems very messy to me

greets
Zoltán Németh

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