You don’t need to submit the form to the PHP script – the script simply needs to be included or required by PHP – this makes the code within it available to your entire application.
As Tom pointed out in his comments, there are security risks to this approach – but it is also not required – most PHP applications includes hundreds or thousands of files on each page load – the trick here is not find the secure and performant way to include your code in the right part of the page load flow.
As you want to capture POSTED form data, you need to check the $_POST object for the data you have posted from your form, then validate it and run additional sanity checks – and then process it.
Related Posts:
- How to eliminate weird 404 errors in wp-admin?
- Does WordPress contain “default” anti-SQL injection code that responds with a 404 error?
- How can I force a “404 Not Found” error
- Some plugins adding full server path after url (with custom wp-content folder)
- Why am I sometimes getting a 404 error when I try to update a page with Elementor?
- Getting a 404 when trying to load /wp-admin/plugin-install.php
- Show a special message for private page?
- What causes an Unexpected HTTP Error within install plugins?
- Error 404 using wpml plugin
- Custom Post Type Plugin not loading category template and loading 404 instead
- An issue with SEO Ultimate
- get 404 when accessing wp-admin/plugin-install.php
- Reoccurring 404 Errors on all subpages
- URL parameters causing 404 on home page, but nowhere else
- Some one is trying to hack my website, Need guidance [closed]
- wp-admin send 404 error
- Which filter/action should I use to serve content for “virtual” files
- Huge number of 404 pages getting spawned
- Pagination/404 I believe wp is getting a page ahead of itself
- How to detect 404 url and make this link underline or change background color?
- why is my wordpress not loading any images?
- All Post WordPress Page Error
- PageNavi redirects to 404 when used as archive page
- WordPress website dont load CSS, JS and images
- WordPress website giving 404
- Plugin with AJAX on subdomains causes 404 in console
- Getting 404 page not found error while trying to access add new plugin / themes
- homepage olderposts link showing page not found
- 404 Page when emptying spam or deleting a plugin
- Plugin Icon does not work correctly
- 404 Error on a WordPress Website, Error disappears for a while and again appears
- /wp-admin/plugins.php takes ages to load, and then 404s
- Is there a way to use latex \cite{reference} in wordpress?
- How to check plugin compatibility before upgrading WordPress
- How do I unlock a post programmatically?
- I need to Remove this line
- How to create a word press user with hashedpassword
- Is it possible to set up multistore in Woocommerce? [closed]
- Show HTML form before WordPress plugin deletion
- Menus, but not by theme location
- Will Gutenberg Have a Negative Impact on Page Speed?
- Use $_GET inside a shortcode print empty Array
- WordPress SVN UTF-8 issue
- Update-safe translating of single text string in plugin
- Effeciently adding Checkboxes to TablePress table cells
- WordPress Phone Field Check (use numbers, spaces and pluses)
- Display plugin-generated content to override a placeholder page
- Members-only page, but accessible via sharable link
- Google trying to index child theme files
- Consume legacy rest api dependent upon WP API plugin
- How to Add Jquery FullCalendar in wp plugin in admin
- How to speed up installing plugins and upgrading WordPress
- WordPress check box unchecked on null value ternary operator [plugin development]
- Wrapping code in an if block
- How to create a “plugin” or “block” that can manipulate WordPress DOM in frontend?
- How to rename files during upload to a random string?
- Redirecting to page on form submit – Revue plugin
- Create WordPress category dynamically
- Take Elementor For Email FIeld Check if user is registered. IF not registered then register on woocommerece
- Template selector for woocommerce product
- How to access values from your own settings page in javascript?
- WP Donation Form with custom payment API
- Visual Composer Tabs don’t work on mobile
- How to load plugin static data from cloudfront
- WP-DBManager Plugin Can’t Find Mysql Path
- Subtract Using GravityWP Count Plugin
- Block Missing from Inserter When Following Block Tutorial
- How to Replicate Elementor Licensing Model
- How do I save meta key value in the save function?
- Showing Search Engine Results in Elementor [closed]
- Real estate schema markup not showing up on Rich Results test
- qTranslate‑X is not translating all shortcodes
- How do I call an action hook into wp_ajax hook callback function
- WordPress Plugin and other pages not opening
- I want to display data last 7 days with date wise in chartjs?
- Redirect a specific User role not admins automatically to view the post that they just updated
- Rewrite Rule in htaccess convert query string into slashes
- How can I view forums from different sites in a single panel? [duplicate]
- Manually update notification of plugins needing updating
- The Best Multilanguage Plugin supporting the FSE [closed]
- warning wp session
- Change social icon in twenty twenty three theme
- How to create a buddypress group automatically if a topic is created
- How to add portfolio category post count in main navigation menu?
- Convert from Portfolio post to WooCommerce products [closed]
- How to mirror or create a post system into a plugin page
- Problem with a shortcode generating a error [closed]
- Can’t update plugins in WordPress, system returns -1
- Per-Day booking with customer-supplied start time using Woocommerce Bookings
- WP FULL CALENDAR (NO NEXT ARTICLES DISPLAY)? [closed]
- Redux Framework slides field – How Can i add new placeholder Filed? [closed]
- Woocommerce business card flyer design [closed]
- Wp private content show me files attachments into post
- How can I make a function work only for desktops and not for mobiles?
- remover item do carrinho na página de checkout
- Changing the “OT Process” Plugin’s Default Slug of /process/
- What’s the best way to update my WordPress theme to Elementor?
- How can I make a function work differently for desktops and for mobiles?
- Why my widget is not visible in the WordPress theme Twenty Twenty-Three
- How to create specific wordpress Table