hey --
I'm trying to detect whether or not the page was just submitted to, and if it was, display something, and if it wasn't display a form to submit to it. Here's the code I have so far:
I'm really new to PHP; can someone tell me what I'm doing wrong, and possibly point me to a good beginners tutorial as well?
Thanks,
asbo
I'm trying to detect whether or not the page was just submitted to, and if it was, display something, and if it wasn't display a form to submit to it. Here's the code I have so far:
Code:
<html><body>
<br><center>
<table style="border: 2px red;" cellpadding="5"><tr><td>
<font face="tahoma" size="1">
<?php
if ($submit) {
echo "You just submited the form!";
} else {
?>
<form method="post" action="<?php echo $PHP_SELF ?>">
First Field: <input style="font-family: verdana, arial, "ms sans serif", sans-serif; font-size: 8pt; color: #000000; background-color: #ffffff; border: 1 solid #000000;" type="text" name="first"><br>
Second Field: <input style="font-family: verdana, arial, "ms sans serif", sans-serif; font-size: 8pt; color: #000000; background-color: #ffffff; border: 1 solid #000000;" type="text" name="second"><br><br>
<center><input style="font-family: verdana, arial, "ms sans serif", sans-serif; font-size: 8pt; color: #000000; background-color: #ffffff; border: 1 solid #000000;" type="Submit" name="submit" value="Do it!"><center>
</form>
<?php } ?>
</td></tr></table></center>
</body></html>
Thanks,
asbo