Trouble with simple PHP
Posted: Thu Oct 22, 2009 9:11 am
I am trying to learn PHP for a small program that will be used with the new Bridge. I have written this:
<html>
<head>
<title>Simple Test</tittle>
</head>
<body>
<form action="formtest.php" method="POST"
<p>Name:<br />
<input type="text" name="user"/></p>
<p>Message:<br />
<textarea name="message" rows="5" cols=40"></textarea></p>
<p>input type="submit" value="send"/></p>
</form>
</body>
</html>
FORMTEST.PHP
<? php
echo"<p>Welcome <b>".$_POST["user"]."</b>!</p>;
echo"<p>Your message is:<br /><b>".$_POST["message"]."</b></p>";
?>
And the output that I get is:
Welcome ".$_POST["user"]."!
?>
What have I done wrong??
Jamie Lowman
<html>
<head>
<title>Simple Test</tittle>
</head>
<body>
<form action="formtest.php" method="POST"
<p>Name:<br />
<input type="text" name="user"/></p>
<p>Message:<br />
<textarea name="message" rows="5" cols=40"></textarea></p>
<p>input type="submit" value="send"/></p>
</form>
</body>
</html>
FORMTEST.PHP
<? php
echo"<p>Welcome <b>".$_POST["user"]."</b>!</p>;
echo"<p>Your message is:<br /><b>".$_POST["message"]."</b></p>";
?>
And the output that I get is:
Welcome ".$_POST["user"]."!
?>
What have I done wrong??
Jamie Lowman