Advertisement
Guest User

Untitled

a guest
Jun 17th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. <html>
  2. <head>
  3. <style type="text/css">
  4. table { margin-bottom: 1.4em; width:100%; } thead th { background: #004a80; color: #fefefe; } th,td,caption { padding: 4px 10px 4px 5px; vertical-align: top; } tr.even td, tbody > tr:nth-child(even) td, tbody > tr:nth-child(even) th { background: #e5ecf9; } tfoot { font-style: italic; }
  5. </style>
  6. </head>
  7. <body>
  8. <?php
  9.  
  10.  
  11. $username="username";
  12. $password="password";
  13. $database="mydb";
  14.  
  15. mysql_connect(localhost,$username,$password);
  16. @mysql_select_db($database) or die( "Unable to select database");
  17. $query = "SELECT `id` FROM `events` WHERE `start` < NOW( ) AND `finish` > NOW( )";
  18. $result=mysql_query($query);
  19. $eventid = mysql_result($result,0);
  20.  
  21.  
  22. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement