Advertisement
Guest User

Untitled

a guest
Apr 26th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.61 KB | None | 0 0
  1.  (isset($_SESSION['username']) and isset($_SESSION['userId'])) {
  2. $query = <<<END
  3.   SELECT temp,timestamp,date FROM indoortemp
  4.    WHERE users_projectId = '{$_SESSION['userId']}'
  5. END;
  6.   $indoorTempInfo = array();
  7.   $result = $mysqli->query($query);
  8.   if ($result->num_rows > 0) {
  9.       while($row = $result->fetch_object()){
  10.         echo("<script>console.log('PHP: ".$row->temp."');</script>");
  11.         echo("<script>console.log('PHP: ".$row->timestamp."');</script>");
  12.         echo("<script>console.log('PHP: ".$row->date."');</script>");
  13.         $indoorTempInfo[] = $row;
  14.       }
  15.   }
  16.   $content = <<<END
  17. END;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement