Forums

Save to database the data captured on a fill in page create (3 posts)

  1. iammary
    Member
    Posted 8 months ago #

    I am trying to capture the input on a form I created on my WordPress page. Is it possible to store the following data by creating a function that would save them into its database? I already created the table on my database.

    <form id="addInstructor" action="?addInstructor" method="post">
    ID Number: <input type="text" name="idnum" />
     
    First name: <input type="text" name="fname" />
     
    Last name: <input type="text" name="lname" />
    <input type="submit" value="Submit" />
    </form>

    I installed Exec-PHP plugin to hopefully execute the function.
    But its not working :(
    Can someone help me?

  2. esmi
    Theme Diva & Forum Moderator
    Posted 8 months ago #

    You'd need to look at turning this into a plugin.
    http://codex.wordpress.org/Writing_a_Plugin

  3. iammary
    Member
    Posted 8 months ago #

    Thanks esmi!

    I created a plugin that that allows me to add shortcode to pages and posts that will show the fields and save it to my database.

    But my problem now is in another plugin I created. This will have 3 dropdown boxes in it. If i'll change the value of the first dropdown, I query it against my database for me to create options for the second dropdown. I cannot capture the on-change event though. :(

Reply

You must log in to post.

About this Topic