hey,
well what do you do in your newpts.php
database calls should be placed in this file… If it’s related to wordpress table there is probably already a function for that. Be sure to call this in your file if it’s outside WP.
define('WP_USE_THEMES', false);
require($_SERVER['DOCUMENT_ROOT'] . '/wp-blog-header.php');
they you can call global $wpdb and play with sql queries
http://codex.wordpress.org/Class_Reference/wpdb
hope this helps,