title: Drawing a bar graph using mysql data using php
body: <p>I am using PHP as the scripting language for the backend of my web application</p>
  
  <pre><code>&lt;?php
  
  //importing db.php in the includes folder
  require("includes/db.php");
  
  $nic = $_POST["NIC"];
  $dp = $_POST["DP"];
  
  $date = $_POST["Date"];
  $tele = $_POST["Tele"];
  $mail = $_POST["Email"];
  
  $sql="INSERT INTO `order` (NIC,DP,Address,Date,Telephone,Email) VALUES ('$nic ','$dp','$address',CURDATE(),'$tele','$mail')";
  
  $result = mysqli_query($db,$sql);
  ?&gt;
  </code></pre>
  
  <p>The above code involves the submission of a form by customers when they place an order. I want to draw a bar graph using number of orders for the y axis and date for the x axis. How can I achieve this?</p>