Support » Fixing WordPress » Insert user data and form entries to custom table

  • Resolved AA-ron


    For registered, logged-in users on my site:

    I would like to create a form that allows the user to enter text in four fields.

    When the registered, logged-in user hits submit:

    I would like to insert a record into a custom table.

    The table would have six columns: user_email, umeta_id #3 (nickname) meta_value, form field1, form field2, form field3, form field4.

    So, the submit function would get the logged-in user’s email and nickname, and then insert those and the four form response fields into the table.

    How am I going to do that?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thinking out loud here …

    Would it actually be easier to have six spots on the form, and pre-fill the first two with existing data?

    Actually, I only need one unique piece of user data, now that I think about it. I can run a custom report to fill in the other piece of data, instead of just dumping the table. Less work on the php side, more work on the SQL side where I know more.

    And I could have the user enter the unique piece of data, even though it would be cooler if the site could fill that in. Maybe later when I’m better at coding.

    And I am also looking at using verify instead of access control. That would simplify while accomplishing the same thing if implemented correctly. People could fill out the form, but if they weren’t registered members, it would keep running verify back.

    That way I don’t have to restrict the page to members only to keep the form from getting spammed.

    The name of this plugin is Fast Secure Contact Form.

    My Gift To You

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Insert user data and form entries to custom table’ is closed to new replies.