Home>Support>How/Can I insert simple custom php code into a page to read from a mysql database?

How/Can I insert simple custom php code into a page to read from a mysql database?

The site I’m transitioning to wordpress includes several pages that display information from a mysql database. Using a customized template, I’ve been able to access and display static data from the dbase (http://testing.myrtlerun.com/resources/) but unable to create a page to receive passed variables. I’m hoping there is a way to include this code in a simple page rather than in the template. What’s the right way to do this? (I’m a complete novice but ready to learn.) A view of the pages as they are used currently is here: http://humanelivingcenter.org/pirc.php

URL: http://testing.myrtlerun.com/resources/

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 10 years, 10 days ago Andrew Misplon
    Hi, I Work Here

    Hi A.L.

    We might have to ask Greg to take a look at this question as I’m not sure about pulling in requests within the WordPress loop which is what you’d be doing if you were requesting from within a page.

    Have you perhaps tried an “insert PHP” plugin?

    https://wordpress.org/plugins/search.php?q=php

  2. 10 years, 9 days ago A.L. Mason

    Thanks. I’ll take a look at that.

  3. 10 years, 9 days ago Andrew Misplon
    Hi, I Work Here

    For sure, let us know how it goes.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More