Greetings,
i have 2 forms and 1 submit button which works fine. When i add a 3rd form it doesn’t work anymore. Any suggestions please? This is the working 2 form version below. thanks
[PHP]
"; echo $_POST["date"]; } ?>[/PHP]
Greetings,
i have 2 forms and 1 submit button which works fine. When i add a 3rd form it doesn’t work anymore. Any suggestions please? This is the working 2 form version below. thanks
[PHP]
You don’t need a separate form for each input. In fact, it’s meant to only have one form per page (unless a login in top right corner of header or something like that, but in that case one form isn’t inside another one), no matter how many inputs. Here is a link: http://stackoverflow.com/questions/379610/can-you-nest-html-forms What you are doing is called nested forms. They are bad. The code colorizer on this site doesn’t like <? tags so I changed them to <?php tags. Short tags will work fine when you actually run it though. I hope this helps. Try this:
[php]<?php
if (isset($_POST[“menu”]) and ($_POST[“date”])){ #If these are set, then we want to echo them out to the user.
echo $_POST[“menu”]."
";
echo $_POST[“date”];
} else { #If they are not set, then we want to give them the form, as this means that they have not completed it yet
?>