I want to display results in a table. Is it possible to use the wordpress tables like the one in the post and page section which shows all posts and pages in the admin section.
global $wpdb;
$table_name = $wpdb->prefix . "mydonationdata";
$sql = "SELECT * FROM ".$table_name."";
$results = $wpdb->get_results($sql) or die(mysql_error());
foreach( $results as $result )
{
echo $result->First_Name;
echo $result->Last_Name;
echo $result->Amount;
echo $result->Email;
}
Aucun commentaire:
Enregistrer un commentaire