This seems very simple, yet I can't pinpoint the problem. All I want this code to do is take in the submitted information and post it back out. It doesn't look like the code 'sees' a value for $submit and, hence, just goes to the else part. Anyone know why this is happening? $submit should be defined...
<html>
<body>
<?php
echo $PHP_SELF;
if ($submit) {
while (list($name, $value) = each($_POST)) {
echo "$name = $value<br>\n";
}
} else {
?>
<form method="POST" action="<?php echo $PHP_SELF?>">
<table width="800" border="1">
<tr>
<td>Blog Name:</td>
<td><input name="blogname" type="text" size="20" maxlength="40"></td>
</tr>
<tr>
<td>Blog Url:</td>
<td><input name="blogurl" type="text" size="20" maxlength="40"></td>
</tr>
<tr>
<td>Your Name:</td>
<td><input name="name" type="text" size="20" maxlength="30"></td>
</tr>
<tr>
<td valign="top">Blog Description:</td>
<td><textarea name="blogdescription" cols="50" rows="4"></textarea></td>
</tr>
<tr>
<td><input name="submit" type="submit" value="Add your blog!"></td>
<td></td>
</tr>
</table>
</form>
<?php
}
?>
</body>
</html>