Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Watersys/daily_consumption.php
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
56 lines (50 sloc)
2.18 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//This page displays a list of all Users Monthly Consumption | |
include('config.php'); | |
?> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous"> | |
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script> | |
<link href="<?php echo $design; ?>/style.css" rel="stylesheet" title="Style" /> | |
<title>Daily Consumption</title> | |
</head> | |
<body> | |
<div> | |
<div align="center"> | |
<div class="header"> | |
<img width="80%" src="<?php echo $design; ?>/images/logo.png" alt="Espace Member" /> | |
</div></div> | |
<div class="contentusers"> | |
<div class="box"> | |
<div class="box_left"> | |
<a href="<?php echo $url_home; ?>">WCSF Index</a> > Daily Consumption | |
</div> | |
<div class="box_right"> | |
<a href="profile.php?id=<?php echo $_SESSION['userid']; ?>"><?php echo htmlentities($_SESSION['username'], ENT_QUOTES, 'UTF-8'); ?></a> (<a href="login.php">Logout</a>) | |
</div> | |
<div class="clean"> | |
</div> | |
</div> | |
<div> | |
<br><?php | |
$query = "select username,daily_consumption from users where username = '{$_SESSION['username']}'"; | |
$result = $var->query($query) or die($var->error); | |
if($result->num_rows > 0) { | |
while($row = $result->fetch_assoc()) { | |
foreach($row as $val) { | |
echo "$val <br/>"; | |
} | |
} | |
} | |
?> | |
</div> | |
<!-- <div class="foot"> | |
<p><b>Water Control System and Discussion Portal for Farmers</b></p> | |
</div> --> | |
</div> | |
</div> | |
</body> | |
</html> |