Hi,
I have a feedback form(rating system from 1-5) coded in php which stores data in mysql. Now I want to create a graph of average ratings.
I have no idea of how to fetch data in a php as a graph from mysql so that it shows the average rating.
Thanks
This is my php form
<title>process</title>
"") print mysql_error() . "";
mysql_select_db($database_name, $db);
if (mysql_error() > "") print mysql_error() . "";
$waiting = $_POST['radio1'];
$consultation = $_POST['radio2'];
$preoperative = $_POST['radio3'];
$specialists = $_POST['radio4'];
$assistants = $_POST['radio5'];
$painful = $_POST['radio6'];
$operatingroom = $_POST['radio7'];
$thought = $_POST['radio8'];
$recommend = $_POST['radio9'];
$suggestions = $_POST['suggestions'];
$query = "insert into feedback (waiting, consultation, preoperative, specialists, assistants, painful, operatingroom, thought, recommend, suggestions) values ('" . $waiting . "', '" . $consultation . "', '" . $preoperative . "', '" . $specialists . "', '" . $assistants . "', '" . $painful . "', '" . $operatingroom . "', '" . $thought . "', '" . $recommend . "', '" . $suggestions . "')";
if (mysql_error() > "") print mysql_error() . "";
$qresult = mysql_query($query);
echo "Thank you for submitting your details!";
?>