• I am in the process of migrating my whole website to WordPress. I was able to succesfully convert all my 7k+ Movable Type posts.

    Now I am struggling with some other pages (not posts). There is a particular page I have that first shows a selects box, the user than selects something in the drop down box and clicks ok, the page is then reloaded, and a PHP script gets what the user selected (method=’post’), makes a connection to a database, selects data accordingly and shows to the user.

    How can I migrate that to WordPress?

    edit: I have the php code working already, but I was unable to make it work inside a wordpress page, the database connections get screwed and making the form reload the same page is not working either!

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Check out the section on creating your own Page Templates at the Pages page in the codex.

    You could create a new Page template, bury all your code into it. Then, in WP, create a new Page, select that template, give it a title and (optionally) just leave the content area blank.

    Thread Starter morroida

    (@morroida)

    I was able to do what you suggested. It works perfectly the first time it loads, but when I click submit and the page reloads itself passing it parameters, for example

    test.com/test-page/?a=a&b=b

    it won´t work 🙁

    test.com/test-page with no parameters loads perfectly

    Thread Starter morroida

    (@morroida)

    can anyone help me please 🙁

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘PHP and database code on Pages’ is closed to new replies.