First of all you are doing everything wrong as a WordPress developer.
- Make a habit of using wp_nonce and other security steps.
- When possible try to avoid inline JavaScript or JavaScript on the same file.
- Important: why you are creating new database connection..? Why you are writing database queries in your own way? Why don’t you follow WordPress codex? WordPress has very simple way to do this.
After making those changes do something like this in your functions.p hp or register.php file
add_action( 'init', 'insertFn');
function insertFn(){
if(isset($_REQUEST['submit'])){
//Your form processing code.
}
}
Please remember sometimes looking at the official documentation is very helpful.
Related Posts:
- Contact form 7 select box different value-text than content-text in option [closed]
- Why “Contact Form 7” doesn’t update PHPmailer library?
- How to get current post ID in Contact Form 7 wpcf7_before_send_mail hook action
- To Disable WordPress Rest API or Not To Disable?
- Contact Form 7 plugin refreshing page on submit [closed]
- How to disable autocomplete for inputs in contact form 7? [closed]
- Server side validation for Contact Form 7 [closed]
- get values from contact form 7 wp plugin [closed]
- Add custom variable in Contact Form 7 mail body
- Can’t send mails using contact plugin [closed]
- Download any file after submitting a form [closed]
- Getting value from dymanic text variable into Contact Form 7
- How to escape the tailwindcss responsive syntax when using with contact form 7? [closed]
- Nextcloud integration with wordpress
- Send Contact form 7 data to remote server using .NET api [closed]
- how to create progress bar in wordpress contact form 7 or other plugin for set progress bar in cf7 [closed]
- Contact Form 7 – Form name blank [closed]
- WordPress contact form 7 to show the form dropdown menus as like [closed]
- Contact Form 7 – Show image on successful send? [closed]
- Send email to multiple addresses on Contact Form 7, but exclude personal details on all but one
- How to modify or create custom contact form 7 select options [closed]
- Hardcode a form in Contact Form 7 [closed]
- Contact Form 7 “non-selectable” options in a drop down [closed]
- Contact Form 7: Load scripts and styles only when there is shortcode? [closed]
- In wordpress how to sent different email separetly when i click on different email ids [closed]
- value not set in contact form 7 plugin of wordpress [closed]
- acceptance_as_validation: on is not working Contact form 7 [closed]
- Contact Form 7 is not redirecting the “Thank-You” page with the removal of CSS and JS of plugins
- Push Contact form 7 variable to front end after submission
- How can I implement radio buttons with icons in Contact form 7?
- Hide button after form submit and save state to localstorage
- Contact Form 7 – Make a selection unavailable after a number of bookings
- WordPress Contact 7 Form – Remove WordPress from the From Sections
- Installation failed, trying to install ANY plugin
- CF7 Custom Recipient – Changing the text
- Multiple CF7 Forms causing multiple recaptcha requests
- Could someone maybe point me in the direction of a decent tutorial on how to create a wordpress plugin that is compatible with another plugin please?
- Capture Recaptcha fail event on Contact Form 7
- get/show Last ID
- User content database [closed]
- Contact Form 7: custom validation [closed]
- Retrieving old forms in Contact Form 7 [closed]
- Integrate Mailchimp to a Contact Form 7 contact form [closed]
- How put a file when the email is sent to user contact form 7
- Contact Form 7 Default value from url [closed]
- Integrate Razorpay quick payments plugin with contact form7 plugin
- How to do Conact form 7 name field validation? [closed]
- Contact form 7 – How to send mail to two different E-mail Address [closed]
- prevent contact form 7 from submission on certain condition
- plugin doesn’t retrieve data from database
- Use Notepad++ as HEX-Editor
- How to transfer a WordPress blog to a different domain?
- Change Page’s Tag Using functions.php File
- WP get_permalink Return Wrong URL
- Remove toolbar option (and set to default to no) in user profile
- [Plugin: Posts 2 Posts] reciprocal connections
- How to Replace Words with Hypertext Link But Ignore Previously Existed Links?
- How to redirect to edit.php page after saving the post,product and showing the message “post saved “
- Apple push notification doesn’t work
- WordPress Ajax Posting from App
- Is any gallery plugin available to generate galleries from existing uploaded images? [closed]
- How Do I Figure Out What File(s) to Edit from Looking at the Source Code [closed]
- Change permalinks of custom post type ‘question’ as post id or any random number once
- Conditional attributes and logic per product category
- How create Group Blogs based on user created Groups
- Displaying Custom Sidebar Without Modifying Theme’s Core File?
- Echo user id of users in seperate table
- How to upload multiple files/images when developing a wordpress plugin?
- Recommend a flexible lightbox that allows an image or HTML to be used
- WordPress reliability
- How to create wordpress widget that is fixed position on the home page
- Php page with filters for custom fields
- Switch from wp-cron to a server cron job
- how to change wp-admin url using function file
- How to pass a query string to another page on the same site?
- The Events Calendar Plugin – List View Background Colour Issue [closed]
- Sage wordpress add customize register
- How to make PDF books readable on site with woo-commerce?
- How to implement color picker from WordPress in my boilerplate plugin?
- custom post type plugin error [closed]
- get_post_meta shortcode returns empty field
- How to get a specific string from a url
- Does anybody know how to insert a complete jquery plugin into a wordpress elementor-page?
- How to change WordPress core language using Loco Translate?
- I would like to add a function that allows the customer to add multiples of the same product to their basket, how can I do this easily?
- How to disable/enable PHP plugin functionality based on a TinyMCE toggle-button
- Can I Embed a Contact Form within a Contact Form Using Contact Form 7 in WordPress
- Using Widget Logic to place menu on multiple pages?
- Creating wordpress admin page panel [Theme Option]
- Surviving WordPress and plugin updates
- How to order users alphabetically by name? in plugin UPME
- Is it possible to setup Category wise Subsciption?
- Why won’t the Comprehensive Google Map Plugin load?
- How to change a specific page to custom page?
- How use Dynamic hyperlink on each wordpress post?
- How to execute init or woocommerce_init only for checkout page
- wordpress jquery is not defined because the head tag is empty
- fatal erro in one line if statment in wordpress plugin [Solved]
- Change email notification language based on the site language in WPForms
- Relationship field only loads items to administrator