Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have configured a Wordpress site for a client for which the content has been migrated from a static HTML site from 2004.

The old site has a link which takes the user to a PHP form (also developed in 2004) which is hosted on a separate domain. This PHP page queries a MySQL database also hosted on the separate domain.

I have been asked if I can make this PHP form appear as part of the new Wordpress site rather than as a link to an external site.

Currently the most straight forward option I can think of is to modify the styling used by the PHP form and then embed it using an iFrame. Alternatively I could try and build a form in Wordpress that will query the MySQL database on a separate domain, but this seems like a lot of work and may have security implications.

Given I am relatively inexperienced with Wordpress what other options are there for doing this?

share|improve this question
Why not use a forms plugin for this? – Brad Dalton May 29 '14 at 15:20
Won't using a forms plugin just streamline the creation of the HTML form? I will still need to submit a query cross domain, and given this is PHP code written in 2004 there isn't going to be a nice RESTful API to use... Do forms plugins help with this? – TonE May 29 '14 at 15:27
I'd honestly just try to slay the whole dragon now. Migrate the table(s) that are populated from the form to the new database/site and build the form in WordPress. Take a look at, I'd probably just build the form out in its own template and handle the sanitization, submission, validation, etc all on that page. I don't know of a forms plugin that's going to play nicely with old custom tables, you're probably just better building the whole thing yourself. – Andrew Bartel May 29 '14 at 15:30
Would love to do this but the database is used by other applications so I don't really have this option. Will present it to my client though as an option - thanks. – TonE May 29 '14 at 15:39
Go with the iframe. – unifiedac May 29 '14 at 20:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.