Tag Archives: access database wordpress

how to access DB at wordpress

  $city=””; $address=””; $postcode=””; $phone=””; $wpconfig = get_site_url().”/wp-config.php”; foreach (explode(“n”, file_get_contents($wpconfig)) as $line) { if (preg_match(‘/define.+?DB_|table_prefix/’, $line)) eval($line); }   if (defined(‘DB_USER’)) { $dbh = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD); mysql_select_db(DB_NAME, $dbh);   $sqlq=”select * from wp_cimy_uef_data where user_id=’”.$curr_user->id.”‘” ;     … Continue reading

Posted in wordpress | Tagged