title: cant get data from database with mysqli
body: <p>I can not figure out why this code is not working. Im trying to create a temp table and pull some data into it then filter some data out. But i cant seem to echo the data it just echos the column name. Here is the code:</p>
  
  <pre><code>if (!$conn) {
      echo "&lt;a href='getschedule.php'&gt;&lt;button&gt;Go Back&lt;/button&gt;&lt;/a&gt;";
      die("Connection failed: " . mysqli_connect_error());
  
  }else{
      echo "Connected successfully&lt;br&gt;&lt;br&gt;";
  }
  $seasontemp = "CREATE TEMPORARY TABLE seasontemp (
  id int NOT NULL,
  firstname varchar(255),
  lastname varchar(255),
  number varchar(255),
  address varchar(255),
  plan_start date NOT NULL,
  plan_comp int(11),
  plan_skip int(11),
  trim_start date,
  trim_comp int(11),
  trim_skip int(11),
  spray_start date,
  spray_comp int(11),
  PRIMARY KEY(id)
  )";
  
  mysqli_query($conn, $seasontemp) or die ("Sql error : ".mysqli_error($conn));
  
  $insertseason = "INSERT INTO seasontemp
      (id, plan_start, plan_comp, plan_skip, trim_start, trim_comp, spray_start, spray_comp)
  SELECT id, plan_start, plan_comp, plan_skip, trim_start, trim_comp, spray_start, spray_comp
  FROM services WHERE plan='17'";
  
  mysqli_query($conn, $insertseason) or die ("Sql error : ".mysqli_error($conn));
  
  $seasonids = "SELECT 'id', 'plan_start' FROM seasontemp";
  $r1 = mysqli_query($conn, $seasonids ) or die ("Sql error : ".mysqli_error($conn));
  if(mysqli_num_rows($r1) &gt; 0){
  $start = mysqli_fetch_assoc($r1);
  $start_date = $start['plan_start'];
  echo $start_date;
  
  }
  
  mysqli_close($conn);
  </code></pre>