Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?PHP
- if (!isset($_POST['submit']))
- {
- ?>
- <form method="post" action="1.php">
- <input name="datuma" value="2012-01-01" id="datuma" type="textbox" />Van<br/>
- <input name="datumb" value="2012-01-06" id="datumb" type="textbox" />Tot<br />
- <input type="submit" name="submit" value="Check datess" />
- </form>
- <?PHP
- }
- else
- {
- ?>
- <?PHP
- $hostname = "localhost";
- $username = "root";
- $pass = "121112";
- $db = "lol";
- mysql_connect($hostname,$username,$pass) or die(mysql_error("Could not connect to mysql please contact a administrator."));
- mysql_select_db($db);
- $datuma = $_POST['datuma'];
- $datumb = $_POST['datumb'];
- $query = "select * from logs where datum between ('$datuma') and ('$datumb')";
- $wauw = mysql_query($query) or die('Kanker error');
- while($row = mysql_fetch_array($wauw, MYSQL_ASSOC))
- {
- print $row['data']. "<br />Logged on : ". $row['datum']; ?> <br/><br /> <?PHP
- }
- }
- ?>
Add Comment
Please, Sign In to add comment