Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Noob questions. I have two forms on one page. How do I distinguish them in php code? For example:

    <form action="" method="post">
          <input type="text" name="test1" />
          <input type="submit" value="Add" />
    </form>
    <form action="" method="post">
          <input type="text" name="test2" />
          <input type="submit" value="Add" />
    </form>
    <?php if($_POST) {
          //Do something
    }
share|improve this question
2  
By name="" and id="". – kaiser Oct 13 '12 at 15:45

closed as off topic by Rarst Oct 13 '12 at 21:13

Questions on WordPress Answers are expected to relate to WordPress within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

Browse other questions tagged or ask your own question.