WordPress.org

Ready to get started?Download WordPress

Forums

Can I populate part of a form with data from our SQL2005 server (2 posts)

  1. barnsley242
    Member
    Posted 1 year ago #

    Are there any plugins available which will allow me to create a webform which pulls in data from our SQL2005 server?

    We use a MySQL database already for the WordPress site.
    Can we use another database to connect to - just for 1 page or for one webform.
    e.g. to populate a drop downlist?

    Or would we have to use another method to do this? - like export from sql2005 to a csv / excel file and then import from this flat file into a webform?

  2. vtxyzzy
    Member
    Posted 1 year ago #

    You can connect to an external database using the wpdb class. A search for 'wordpress connect external database' will find many examples. For example, this one: http://wordpress.stackexchange.com/questions/26463/connect-forms-in-wp-to-external-database

    Just be sure that you use the external database information instead of the DB_* constants you see in some of the examples:

    $external_users_db = new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);

Topic Closed

This topic has been closed to new replies.

About this Topic