<?php include('dbconnect.php');

   $myData = mysql_query("SELECT * FROM sensor ORDER BY time");

 $numberEntries = mysql_num_rows($myData);
 echo "&total"."=".$numberEntries;
 echo "&micval is =".$micval;

for ($i=0; $i < $numberEntries; $i++) {

  $entry = mysql_fetch_array($myData);
  echo "&micval".$i."=".$entry['micval'];

}

//echo "<br><br>Num of rows= " . $numberEntries; mysql_close(); ?>