How to Create Plugin for Queries to External Database
-
Not sure how to ask this; please be gentle. I have not been using WP for years. Just installed version 4.1.1.
I have a pure HTML & PHP local tool that allows a user to query a video database (videodb) to search (read-only) for records in the database. I want to convert that tool to a wordpress plugin (I think plug-in is the proper choice). I intend to use the wpdb class to connect to the external database (same host as WP); I don’t perceive any issues with that.
What I don’t know is how to structure user forms and then show results of the query. Would those be in WP Pages or Page Templates, or something else?
There are eight queries (Title, Location, Genre, etc.). If a user wants to search for videos for an Actor a small form is presented where the user enters a string (actor’s name), submits the form which queries the database and lists the videos with that actor. The Forms are HTML but the rest of the logic is PHP, which I understand cannot go in WP Pages. Do I need two files per topic, one HTML form and one Page Template with PHP code? It’s how to organize this that has me confused.
Suggestions are most welcome.
Thanks.
The topic ‘How to Create Plugin for Queries to External Database’ is closed to new replies.