Title: External database integration
Last modified: August 21, 2016

---

# External database integration

 *  [Robodashy](https://wordpress.org/support/users/robodashy/)
 * (@robodashy)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/external-database-integration/)
 * Before I go pastebin’ing a bucketload of code I’ll give you the outline of the
   problem, then if y’all want the code I’ll put it in a reply later – but here 
   goes:
 * I’m developing a site for a client, pretty much just taking their existing .asp
   site and converting it to WP (while making it all nice and pretty).
    Almost done,
   but now I’m stuck.
 * The custom search page they have references an external database they have, so
   what I’ve done is created a custom page hoping to implement this feature.
 * The custom page I’ve created works, right up until I get to the custom php/sql.
   If I have the file with just the code above and below the commented stuff that
   says it works the page renders fine, but no content. It’s the stuff between that
   breaks it (basic code below):
    ‘ <?php /* BUNCH OF TEMPLATE GENERATING COMMENTS
   HERE */ get_header();
 *  do_action( ‘genesis_before_content_sidebar_wrap’ );
    genesis_markup( array( ‘
   html5’ => ‘<div %s>’, ‘xhtml’ => ‘<div id=”content-sidebar-wrap”>’, ‘context’
   => ‘content-sidebar-wrap’, ) );
 *  do_action( ‘genesis_before_content’ );
    genesis_markup( array( ‘html5’ => ‘<
   main %s>’, ‘xhtml’ => ‘<div id=”content” class=”hfeed”>’, ‘context’ => ‘content’,));
 *  ?>
    /* CODE ABOVE WORKS *//* CODE ABOVE WORKS *//* CODE ABOVE WORKS */
 * /** This is where the problem lies **/
 * /* CODE BELOW WORKS *//* CODE BELOW WORKS *//* CODE BELOW WORKS */
    <?php genesis_markup(
   array( ‘html5’ => ‘</main>’, //* end .content ‘xhtml’ => ‘</div>’, //* end #content));
   do_action( ‘genesis_after_content’ );
 *  echo ‘</div>’; //* end .content-sidebar-wrap or #content-sidebar-wrap
    do_action(‘
   genesis_after_content_sidebar_wrap’ );
 *  get_footer();
    ‘
 * In the /** This is where the problem lies **/ section I have my includes to connect
   to the external database as well as a formating php file, shouldn’t be any problems–
   then I have all the php/sql connection code that checks the database for … data…
   and then generates html based on the data received.
 * With this code included I get the white page of death. Can’t even check to see
   if there are any errors being generated. I’ve checked for syntax errors but can’t
   find any, so I’m assuming it has something to do with the way WP restricts access
   to outside sources (or just the way WP restricts stuff in general).
 * Can anyone point me in the right direction on how to get this to work?
 * Would you like me to paste the full code (pastebin)?
    Or is what I’ve provided
   sufficient?
 * Should I just have a completely separate php file to run this and just create
   a custom link to the url?
 * Any and all help is most greatly appreciated.
 * Thanks.

Viewing 1 replies (of 1 total)

 *  Thread Starter [Robodashy](https://wordpress.org/support/users/robodashy/)
 * (@robodashy)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/external-database-integration/#post-4883900)
 * After some investigation I’ve discovered I’m asking the wrong question – going
   to close this one off and create a new topic asking the right thing. Sorry for
   spam

Viewing 1 replies (of 1 total)

The topic ‘External database integration’ is closed to new replies.

## Tags

 * [custom](https://wordpress.org/support/topic-tag/custom/)
 * [database](https://wordpress.org/support/topic-tag/database/)
 * [external](https://wordpress.org/support/topic-tag/external/)
 * [table](https://wordpress.org/support/topic-tag/table/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 1 reply
 * 1 participant
 * Last reply from: [Robodashy](https://wordpress.org/support/users/robodashy/)
 * Last activity: [12 years, 1 month ago](https://wordpress.org/support/topic/external-database-integration/#post-4883900)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
