Advertisement
Guest User

Untitled

a guest
Aug 7th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. <?php
  2.  
  3. $username = "root";
  4. $password = "";
  5. $hostname = "localhost";
  6. $db = 'db529197';
  7.  
  8. //connection to the database
  9. $dbhandle = mysqli_connect($hostname, $username, $password,$db)
  10. or die("Unable to connect to MySQL");
  11.  
  12. //select a database to work with
  13. //execute the SQL query and return records
  14. $result = mysqli_query($dbhandle,"SELECT * FROM eventos WHERE id (1)");
  15. $row = mysqli_fetch_array($result)
  16.  
  17. ?>
  18. <script>
  19.  
  20. let fecha = <?php $row["fecha"] ?>;
  21. console.log(fecha);
  22.  
  23.  
  24. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement