Support » Fixing WordPress » Adding my own search facility within WP posts

  • Hi

    I wonder if following is possible.

    Can I create a post within WP, that has a textbox and a Submit button. I want the users to enter a keyword into this textbox and press Submit button. I will write the PHP-MySQL code to search for that keyword in a database. Then I want to display the search result witnin the SAME post.

    Can I do this?

    If you can give some examples how to achieve this, I would appreciate this.


Viewing 1 replies (of 1 total)
  • not a ‘post’, but a ‘page’. Create a custom page template that does all the code handling under the covers, make sure it is securely posting the search to itself (i.e., clean up any posted form data so it can’t be used to hack your site), and create a page and set that to be its custom template. all done. 😉

    Read up on custom page templates on the codex.

Viewing 1 replies (of 1 total)
  • The topic ‘Adding my own search facility within WP posts’ is closed to new replies.