this is the code for creating pie chart using php and db