Custom PHP/MySQL code inside Page template
-
Hi Guys,
I want to create a custom Page template with a bit of my own PHP & MySQL code.
My code’s functionality:
• Allow someone to enter a word/phrase into a text input box
• Connect to a totally separate database, submit the SQL query.
• Reload the page returned results from the database.I know I can get custom PHP code within a Page template, but when you submit my form, it would reload the page with mydomain.com/pageName/?search=something
This generates a WordPress 404 page saying that page doesn’t exist. If I used $_POST method, where it doesn’t show what was submitted, will it fix the problem?
If I wanted the URL to display what was searched (bookmarkable), is there a mod_rewrite/.htaccess edit that will allow this to happen without throwing an error?
Help is immensely appreciated. Working on a huge project for a client. 🙂
EDIT: PS. I will be using WordPress 3.0, but if I need to use another version for some reason, it’s okay.
The topic ‘Custom PHP/MySQL code inside Page template’ is closed to new replies.