Use admin-post to submit form data to external database

I’m answering this question to help future WordPress developers on their quest for knowledge. The answer is YES, you can connect to an external database when using the admin_post action. Below is the corrected source… <?php class x94 { private $externalDB01; public function __construct(){ add_action( ‘admin_post_submitForm9’, array( $this, ‘formHandling’ ), 11, 1 ); add_action( ‘plugins_loaded’, … Read more

Auto Submit Contact Form 7

You need to call submit() function on document ready check the code <script type=”text/javascript”> jQuery(document).ready(function(){ jQuery(“#wpcf7-f3857-o1 form”).submit(); }); </script> In my code wpcf7-f3857-o1 is the contact form’s css id. You need to change that id. try the code and let me know the result. Thanks

.html form added to a page

If you want to have a form on a page, there are plugins that allow that; a popular one is “Contact Form 7”. But if you want a specific ‘action’ page to fire when the submit button is used, then it might be best to create a page template. The template could include the form … Read more

custom search query database in child theme

The text input names don’t match the $_POST keys you are looping. Using [] in the input name attribute is for handling multiple inputs, not multiple keys. Try replacing name=”search[batch_no]” and name=”search[rfid_chip_no]” with simply name=”search_batch_no” and name=”search_rfid_chip_no” and looping $_POST instead of $_POST[“search”]. Also you need to check the conditions match, as only code and … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)