Posted by #2pencil on 07/12/07 16:39
I would try the following code.
<form action="test.php" method="post">
Feet: <input type="text" name="feet" id="feet">
<input type="submit" value="Convert">
</form>
Also, for trouble shooting change 'post' to 'get' & then you can see
all values passed in your url.
test.php:
<?php
// Retrieve user's entry
if($_POST['feet']) {
$feet = $_POST['feet'];
// Convert $feet to $inches
$inches = ($feet * 12);
// Display $inches
echo "$inches";
}
else echo 'Post contains no value.<br>';
?>
HTH
-#2pencil-
http://www.akroncdnr.com
Navigation:
[Reply to this message]
|