简体   繁体   中英

Where do I place the PHP file in Wordpress that I want to run on a form submission

I have a form on a WordPress page as follows:

<form id="submissions-form" action="submissions-upload.php" 
    enctype="multipart/form-data" method="post" name="submissions_upload">
    ...
</form>

Where should I place my submissions-upload.php file?

I specifically want to run the submissions-upload.php code, not code on my page.

I don't know where wordpress pages are meant to be stored. All I know is that it doesn't work on the root page.

You can use same page ... Like as

<?php 
   if($_POST){
       print_r($_POST);
     }
 ?> 
 <form id="submissions-form" action="#" 
   enctype="multipart/form-data" method="post" name="submissions_upload">
...
</form>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM