title: Use datetime data from SQL query to populate "input type=time" field
body: <p>I'm trying to get an SQL query with PHP to populate various fields in a form so they can be edited by a site administrator. Those two fields are date and time.</p>
  
  <p>I'm using the two input types 'date' and 'time'. The date field is populating perfectly. The time field is coming up blank. The data for both is coming from the same SQL query. I'd like them both to display within the intended format for each field. (I'm using Chrome for this as I know the field types aren't supported by all browsers).</p>
  
  <pre><code>//Queries
          $pull_game = "select datetime, city, opponents.opponent_id, game_type, tourn_name, time, home_score, vis_score, day_of_week, month, day, year, parks.park_id, park, win, loss, tie, result from games, opponents, parks, tournaments where opponents.opponent_id = games.opponent_id and parks.park_id = games.park_id and tournaments.tourn_id = games.tourn_id and game_id= ".$_POST['game_id'] . ";";
          $game_stats = mysqli_query($con,$pull_game) or die("ERROR: $pull_game. ".mysqli_error());
          $game = mysqli_fetch_array($game_stats);
  
  //Display data
          &lt;input type='date' name='date' value=&lt;?= $game['datetime']?&gt;&gt;
          &lt;input type='time' name='time' value=&lt;?= $game['datetime']?&gt;&gt;
  </code></pre>
  
  <p>I've tried eliminating the date field to see if the time field would work, but it still came up blank. I've had no luck researching this - most of the content I find is for updating the DB with datetime data. I'm looking for the opposite (sort of).</p>
  
  <p>Any help would be appreciated.</p>