I am new with word press and I have a table in phpmyadmin
which has the data which i want to display in my word press site on different posts and pages. I have searched a lot around and came up with a plugin named Allow PHP in Post and Pages
. This plugin allows you to write php script in posts and pages. I have tried a small code in my page post but it just gives me Resource id #147
in display but not the result i want. This is the code which i tried in one of my post.
[php]
$connect = mysql_connect("localhost", "root", "");
mysql_select_db("ahadith");
$query = mysql_query("SELECT * FROM muslim");
echo ($query);
[/php]
Is there anyone who can help me with this. Or is there another way through which i can fetch desired data from my database and show it in my word press site. Thank you.