Re: form to php
| From: | Luis Moreira | Date: | Thu, 29 Jul 2004 09:23:44 +0000 |
| Subject: | Re: form to php | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-24279@lists.php.net to get a copy of this message | ||
Is this the contebnt of the PHP file ?
Hi <?php echo $_POST['name']; ?>.You are <?php echo $_POST['age']; ?>
It can not start by the "Hi" word ...
Action.php should be something like
<?
$name = $_POST['name']; $age = $_POST['age'];
echo "Hi $name. You are $age";
?>
PHP MySQL wrote:
hi list, i have managed to successfully install php and i am now going through the manual and trying a few of the examples given there. The examples i have tried till now are all working except for one. The example about inputting in the form and then displaying it through php is not working for me. But when i run it i get the entire code in action.php instead. The example i am referring to is: 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 action.php: Hi <?php echo $_POST['name']; ?>.You are <?php echo $_POST['age']; ?> Please tell me whts wrong.... thanks in advance penjo Yahoo! India Matrimony: Find your life partneronline.