WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
Sending Mail - Adding PHP INSERT Statement? (4 posts)

  1. twilitegxa
    Member
    Posted 3 years ago #

    I would like to add a php INSERT statement to my mail function in order to save all form submits into a table in my database. Can anyone tell me where in my plugin folders the code for the mail function is located? I know how to add the INSERT statement, I just need to know where to place it so that it will insert the information from the form upon successful submission. Wherever the form sends the e-mail out is where I'd like to insert into the database. Can anyone help please?

  2. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 3 years ago #

    includes/classes.php

    but there is already an extension plugin for that.

  3. twilitegxa
    Member
    Posted 3 years ago #

    This extension is great, but I have a client who is not able to navigate on the backend of WordPress very well. I need a way to create a customized admin section for them that will allow them to view the messages that is SUPER user friendly for them. The plugin saves the data from the form submission in a VERY confusing way, and this make sit hard for me to create the customized admin page for the user.

    Where in this code (in includes/classes.php) is the part where it submits the form specifically? I see where it validates and where it sends the message, but I need to know where it submits the form successfully I guess because I want to place the insert statement there and pull the values from the form submission. The plugin is a little confusing for me. Is there any way you can help a little? You are the creator of the plugin, so you would best be able to tell me where to place what. :-) I know you are very busy and I would greatly appreciate the help if you have the time!

  4. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 3 years ago #

    Look into includes/controller.php.

    I think that using wpcf7_mail_sent action hook is the best fit for your needs.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic