PHP/MySQL Simple Water Billing System
Submitted by rinvizle on Tuesday, November 29, 2016 - 15:36.
We will teach you how to create Simple Water Billing System. This simple system uses for recording the water consumption every month you use, it also creates and total all your consumption from your previous record to the present. You can also generate a report for the billing process of your records from the beginning you started using this system. This simple system compose of PHP, MySQL, Javascript and Bootstrap.
Viewpayment.php - And this is for the viewing of payments and also a report that you can print it out or just called a receipt.
Paybill.php - And for paying of your bill from previous to present.
Hope that you learn in this tutorial. And for more updates and programming tutorials don't hesitate to ask and we will answer your questions and suggestions. Don't forget to LIKE & SHARE this website.
Sample Code
Billing.php - This script is for the Home page and for the other forms.- echo '<script>windows: location="index.php"</script>';
- }
- ?>
- <?php
- $session=$_SESSION['id'];
- include 'db.php';
- {
- $sessionname=$row['name'];
- }
- ?>
- <!DOCTYPE html>
- <html>
- <head>
- <title>Simple Water Billing System</title>
- <link href="css/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css" />
- <link href="css/facebox.css" media="screen" rel="stylesheet" type="text/css" />
- <script src="js/jquery1.js" type="text/javascript"></script>
- <script src="css/facebox.js" type="text/javascript"></script>
- <script type="text/javascript">
- jQuery(document).ready(function($) {
- $('a[rel*=facebox]').facebox({
- loadingImage : 'src/loading.gif',
- closeImage : 'src/closelabel.png'
- })
- })
- </script>
- <script src="js/application.js" type="text/javascript" charset="utf-8"></script>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Simple Water Billing System</title>
- </head>
- <body>
- <nav class="navbar navbar-default">
- <div class="container-fluid">
- <div class="navbar-header">
- <a class="navbar-brand" href="https://www.sourcecodester.com">Sourcecodester</a>
- </div>
- <ul class="nav navbar-nav">
- <li class="active"><a href="billing.php">Home</a></li>
- <li><a href="bill.php">Billing</a></li>
- <li><a href="user.php">Users</a></li>
- <li><a href="addclient.php">Add Client</a></li>
- <li><a href="viewuser.php">View Client</a></li>
- <li><a href="logout.php">Logout</a></li>
- </ul>
- </div>
- </nav>
- <h1 align="center">Simple Water Billing System</h1>
- </body>
- </html>

- echo '<script>windows: location="index.php"</script>';
- }
- ?>
- <?php
- include 'db.php';
- $id =$_REQUEST['id'];
- {
- $prev=$row['prev'];
- $owners_id=$row['owners_id'];
- $pres=$row['pres'];
- $price=$row['price'];
- $totalcons=$pres - $prev;
- $bill=$totalcons * $price;
- $date=$row['date'];
- }
- ?>
- <?php
- include 'db.php';
- if (!$result)
- {
- }
- $id=$test['id'] ;
- $fname= $test['fname'] ;
- $lname=$test['lname'] ;
- $mi=$test['mi'] ;
- $address=$test['address'] ;
- $contact=$test['contact'] ;
- ?>
- <?php
- $session=$_SESSION['id'];
- include 'db.php';
- {
- $sessionname=$row['name'];
- }
- ?>
- <?php
- include 'db.php';
- $owner_id =$_REQUEST['id'];
- if (!$result)
- {
- }
- $id=$test['id'] ;
- $fname= $test['fname'] ;
- $lname=$test['lname'] ;
- $mi=$test['mi'] ;
- $address=$test['address'] ;
- $contact=$test['contact'] ;
- ?>
- <h2 align="center">Client Bill</h2><hr>
- <h3>Name: <?php echo $fname.' ' .$lname.' '.$mi;?></h3>
- echo $date;?></p>
- <form method="post" action="addbill.php">
- <div>
- <table class="table" width="355px">
- <thead>
- <tr>
- <input type="hidden" name="owners_id" value="<?php echo $id; ?>" />
- <input type="hidden" name="date" value="<?php echo $date; ?>" />
- <td width="118">Previous Reading:</td>
- <td width="66"><input type="text" name="prev" /></td>
- <td>Cu.m</td>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>Present Reading:</td>
- <td><input type="text" name="pres" /></td>
- <td>Cu.m</td>
- </tr>
- <tr>
- <td>Price/Cu.m</td>
- <td><input type="text" name="price" value="10" /></td>
- <td>php</td>
- </tr>
- <tr>
- <td><button type="submit" name="total" class="btn btn-default">ADD</button></td>
- </tr>
- </tbody>
- </table>
- </div>

Comments
Add new comment
- Add new comment
- 3344 views