Guest User

Untitled

a guest
May 25th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. <?PHP
  2. if (!isset($_POST['submit']))
  3. {
  4. ?>
  5. <form method="post" action="1.php">
  6. <input name="datuma" value="2012-01-01" id="datuma" type="textbox" />Van<br/>
  7. <input name="datumb" value="2012-01-06" id="datumb" type="textbox" />Tot<br />
  8. <input type="submit" name="submit" value="Check datess" />
  9. </form>
  10. <?PHP
  11. }
  12. else
  13. {
  14. ?>
  15.  
  16.  
  17.  
  18. <?PHP
  19. $hostname = "localhost";
  20. $username = "root";
  21. $pass = "121112";
  22. $db = "lol";
  23.  
  24. mysql_connect($hostname,$username,$pass) or die(mysql_error("Could not connect to mysql please contact a administrator."));
  25. mysql_select_db($db);
  26.  
  27. $datuma = $_POST['datuma'];
  28. $datumb = $_POST['datumb'];
  29.  
  30.  
  31. $query = "select * from logs where datum between ('$datuma') and ('$datumb')";
  32. $wauw = mysql_query($query) or die('Kanker error');
  33.  
  34. while($row = mysql_fetch_array($wauw, MYSQL_ASSOC))
  35. {
  36.  
  37. print $row['data']. "<br />Logged on : ". $row['datum']; ?> <br/><br /> <?PHP
  38.  
  39. }
  40.  
  41. }
  42. ?>
Add Comment
Please, Sign In to add comment