Invalid form Submission in WordPress wp_handle_upload - Kvcodes
X

Congrats, You are Subscribed to Receive Updates.

Invalid form Submission in WordPress wp_handle_upload


Invalid form Submission in WordPress wp_handle_upload. Sometime, we face the issue of `Invalid form Submission` . I have a solution for the problem. It actually occurs when you pass single argument to the `wp_handle_upload`.  your code might be like the below one.

$file = wp_handle_upload($_FILES['upload_file']);

You have to add one more parameter with it.

$file = wp_handle_upload($_FILES['upload_file'],  array('test_form' => FALSE));

This one solves your problem .

commenter

About Varadharaj V

The founder of Kvcodes, Varadharaj V is an ERP Analyst and a Web developer specializing in WordPress(WP), WP Theme development, WP Plugin development, Frontaccounting(FA), Sales, Purchases, Inventory, Ledgers, Payroll & HRM, CRM, FA Core Customization, OpenCart Theme Development, PHP, HTML, CSS, jQuery, Bootstrap development and content SEO.

Comment Below

Your email address will not be published. Required fields are marked *

*

Current ye@r *

Menu

Sidebar

Subscribe E-mail Updates

Congrats, You are Subscribed to Receive Updates.

Advertisement

Category Posts