How to get values from a form (template) on my contact us page?

  • Unknown's avatar

    Hey everyone…
    I’m new to WordPress plugin development. This question might have been asked a couple of times before, but couldn’t find an answer around so asking here!
    Recently we made a plugin where in we had a register form (which was a template)… Users had to fill in the form to register their info. The function in the plugin did all the validations and database stuff. But we used a very non-standard approach for doing it. We added an extra parameter in the form action
    (eg:<form method=”post” action=”<?php bloginfo(‘siteurl’);?>user_reg=submit”>).
    And then in the plugin, we did this:
    if($_GET[‘user_reg’]==”submit”)
    {
    register(); //function that does all the work!
    }

    My question is, how do i get the $_post/$_get variables from a form in my page, in my plugin? Is there a standard way of doing this? Any specific action/filter hooks for this? I searched a lot on google but couldn’t find a proper answer…

    The blog I need help with is: (visible only to logged in users)

  • The topic ‘How to get values from a form (template) on my contact us page?’ is closed to new replies.