convert lib.inc to use phplib pdo (php data objects) prepared statements