A helpful clue would be to look at the URL in the address bar of your 404 page. A reliable approach for form action in WP looks like the snippet below.
<form method="post" id="thisform" action="<?php bloginfo('url'); >/dbsearch/">
I would create your page in WP, ensure the page slug is ‘dbsearch’ as this determines your permalink (http://domain/dbsearch) and the template used. You can of course use any slug you like but match this to your form action. Rename your script ‘page_dbsearch.php’ to ‘page-dbsearch.php’. WP will pick this up as the page template for your results page.
All of your form data will be available in the $_POST array to write your DB query with.
Related Posts:
- 404 Error on form submission within custom post type
- Submiting custom form give error 404
- Custom post type pagination 404 fix?
- Inconsistent temporary 404s on whole install | PHP error with post-template.php
- Custom post type 404s with rewriting even after resetting permalinks
- Get post ID from wp_insert_post()
- Pagination throws 404 error on custom taxonomy archive pages
- Create page to handle form submission
- 404 on child page when parent page slug is identical to custom post type
- Hierachical Custom post types permalinks not working
- How can i avoid the permalink start with ‘blog’ while using the custom post type?
- Child pages on hierarchical Custom Post Types 404s
- Pagination throws 404
- How do I redirect all 404 errors of a specific post type to another URL?
- Removing CPT slug from URL results in 404 error for archive page
- Remove Slug from Custom Post Type results in 404
- Dynamic dropdown custom post list based on dropdown selection
- Reason action hook won’t work with update_post_meta from frontend form? Alternative?
- How can I fix a slow redirect after form submit from frontend (no plugin)?
- Pagination gives 404 error
- Custom Taxonomy 404
- Linking three taxonomies with ACF
- Create second custom 404 page for selected post type
- Custom Permalink with Dynamic Taxonomy for Custom Post Type – Works, but breaks other permalinks
- Custom Post Type rewrite rules not working, how to alter the rewrite order?
- 404 error on custom post type
- Multisite custom post type’s single page 404
- How to add the post ID (or any other post data) to a Contact Form 7 mail?
- Why my custom post posts aren’t showing (404 error / page not found)
- WordPress posts with multiple fields
- How to Submit Post Via cURL & PHP
- Custom Post Type + 20k posts = blank/404 within Admin edit.php [duplicate]
- Bizarre Permalinks Issue: 404 Errors Everywhere
- Send email button in custom post type backend
- How to query custom post types posts filtered by multiple custom taxonomies through a form selection
- Custom Post Type / Two level deep taxonomy (cat. and subcat.) uri problem (error 404)
- Wrong request query on cpt and tax
- Display users uploaded files as posts
- Post form as custom post
- How do I display content to users who are not logged in instead of 404 on Private custom posts?
- Help with Elementor Pagination CPT archive 404 problem
- Trouble with CPT Child 404
- Using taxonomy term in CPT permalink – Pages 404’s
- Form action/link to render a plugin in WordPress front-end
- How to prevent a CPT’s slug and page slug from conflicting with each other?
- How to integrate a form (Ninja Form or Contact Form 7) with Custom Post Types?
- Custom post type archive pagination 404
- Edit Custom Post Type on Custom Admin Page instead Post Admin
- Using POST method in meta box, no results
- Top Level pages in wordpress giving 404, but child pages working fine
- cutsom posts 404ing
- 404 in custom post type feed with mistake permalink
- How to solve this custom post type goes to 404 page?
- Problems with 404, .htaccess, permalinks and WordPress custom posts locally on Snow Leopard
- Custom rewrite to fetch feed data
- Custom WP_Query always respond with 200 status even when no entry
- Custom taxonomy page returns 404
- Custom taxonomy template list not working (404)
- Custom Post 404
- Custom taxonomy template shows 404 Error
- Custom post type categories gives 404 error
- How to selected value default in option list?
- Making a form for user to add new custom post with custom taxonomies and custom fields
- Safe to throw 404 error in request filter?
- either single-{custom}.php 404’s OR /taxonomy/ 404’s – custom post type and taxonomy permalinks
- Submit Custom Postypes from frontend
- Custom Post Type Child Won’t Come Through With Pretty Permalinks
- How to submit custom post type front end form when a user buy specific product
- How to upload two input files [closed]
- Change dynamically the dropdown list value
- Custom post type single page 404
- How to submit the date with ajax?
- Custom taxonomy returns 404 even with saving permalinks
- ‘Simple’ Reservation System
- How can I get custom post types to recognize pretty permalink variables?
- Enabling hierarchical in a Custom Post Type gives error 404
- Standard Page Child of CPT Not Found (404)
- Custom Post Type Front Page Gives 404
- Published page but it is page not found
- Pagination for custom query returns 404
- New entries to custom post type produce 404 on single view
- Add new custom post type screen (admin area) results into 404
- Some permalinks on Apache/localhost development setup return 404’s when set to anything other than plain permalinks
- Custom 404 redirect for a luddite
- Custom Post Type Rewrite – Page Not Found
- Understanding the workflow of form creation plugin
- How to create a petition like form based on custom post types?
- Front-end form submission not creating post
- Pages displays correctly but returning a 404 error in http header.
- Pagination in custom loop for custom post type throwing 404 error
- Forms with multiple element types using custom post types
- 404 for children in hierarchical custom post type
- 404 with Custom Post Type
- WordPress custom post type post and category links 404
- 404 Error On Custom Taxonomy Pages 2, 3, etc
- Pagination on category pages using wp_pagenavi causes 404 errors
- Custom Post Type, 404 error
- How to debug a 404 error on pages whose content is perfectly displayed when I explore it?
- Custom plugin contact form connecting to mailchimp API
- How to add categories to a custom post type using wp_insert_post($new_post);