Sensation Energy

Tutorials


Content


Advertising


Funtion 7 Report

Simple report add id value "id" "select"

Report wirh add "id" in "while"

Report wirh add "id" in "while" and "rows"


Example 1 - Form (ind1.php)


<form action="result1.php" method="GET">
<div class="form-group">
<lable>ID</lable>
<input type="text" id="title"  name="id"  class="form-input" required  /></td>
</div>
<div class="btn-group">
<button  type="submit" value="Search">GO !</button>
</div>
</form>

Example 1 - Result (res1.php)


<?php
include "conn.php";
if(isset($_GET["search_button"]))
{
$search=$_GET['search'];
if($search=="")
{
echo "<center><h1><b>Please Write Something In search Box</b></h1></center>";
exit();
} }
$id = $_GET['id'];
?>
<table>
<thead>
<tr>
<th>Id</th>
<th>Name</th>
<th>Title</a></th>
<th>Date</th>
</tr>
</thead>
<tbody>
<?php
$rs1 = mysqli_query($conection, "SELECT * FROM rep WHERE id LIKE '%".$id."%' ");
while($row1 = mysqli_fetch_assoc($rs1)){
?>
<tr>
<td><?php echo $row1['id']; ?></td>
<td><?php echo $row1['name']; ?></td>
<td><?php echo $row1['title']; ?></td>
<td><?php echo $row1['date']; ?></td>
</tr>
<?php
}
?>
</tbody>
</table>

Example 2 - Form (ind2.php)


<form action="result2.php" method="GET">
<h2>Select</h2>
<div class="form-group">
<lable>ID</lable>
<input type="text" id="title"  name="id"  class="form-input" required  /></td>
</div>
<div class="form-group">
<lable>ID name</lable>
<input type="text" id="id_name"  name="id_name"  class="form-input" required  /></td>
</div>
<div class="form-group">
<lable>ID name 1</lable>
<input type="text" id="id_name1"  name="id_name1"  class="form-input" required  /></td>
</div>
<div class="form-group">
<lable>Table</lable>
<input type="text" id="title"  name="tbl_name"  class="form-input" required  /></td>
</div>
<div class="btn-group">
<button  type="submit" value="Search">GO !</button>
</div>
</form>


Example 2 - Result (res2.php)


<?php
include "conn.php";
if(isset($_GET["search_button"]))
{
$search=$_GET['search'];
if($search=="")
{
echo "<center><h1><b>Please Write Something In search Box</b></h1></center>";
exit();
} }
$id = $_GET['id'];
$tbl_name = $_GET['tbl_name'];
$id_name = $_GET['id_name'];
$id_name1 = $_GET['id_name1'];
?>
<table>
<thead>
<tr>
<th>Id</th>
<th>Name</th>
<th>Title</a></th>
<th>Date</th>
</tr>
</thead>
<tbody>
<?php
$rs1 = mysqli_query($conection, "SELECT * FROM $tbl_name WHERE $id_name LIKE '%".$$id_name1."%' ");
while($row1 = mysqli_fetch_assoc($rs1)){
?>
<tr>
<td><?php echo $row1['id']; ?></td>
<td><?php echo $row1['name']; ?></td>
<td><?php echo $row1['title']; ?></td>
<td><?php echo $row1['date']; ?></td>
</tr>
<?php
}
?>
</tbody>
</table>

Example 3 - Form (ind3.php)


<form action="result3.php" method="GET">
<h2>Select</h2>
<div class="form-group">
<lable>ID</lable>
<input type="text" id="id"  name="id"  class="form-input" required  /></td>
</div>
<div class="form-group">
<lable>ID name</lable>
<input type="text" id="id_name"  name="id_name"  class="form-input" required  /></td>
</div>
<div class="form-group">
<lable>ID name 1</lable>
<input type="text" id="id_name1"  name="id_name1"  class="form-input" required  /></td>
</div>
<div class="form-group">
<lable>Tabela</lable>
<input type="text" id="title"  name="tbl_name"  class="form-input" required  /></td>
</div>
<h2>Rows</h2>
<div class="form-group">
<lable>row1_name</lable>
<input type="text" name="row1_name"  class="form-input" required  /></td>
</div>
<div class="form-group">
<lable>row2_name</lable>
<input type="text" name="row2_name"  class="form-input" required  /></td>
</div>
<div class="form-group">
<lable>row3_name</lable>
<input type="text"  name="row3_name"  class="form-input" required  /></td>
</div>
<div class="form-group">
<lable>row4_name</lable>
<input type="text" name="row4_name"  class="form-input" required  /></td>
</div>
<div class="btn-group">
<div align="center">
<button class="btn-10" type="submit" value="Search">GO !</button>
</div>
</div>
</form>

Example 3 - Result (res3.php)


<?php
include "conn.php";
if(isset($_GET["search_button"]))
{
$search=$_GET['search'];
if($search=="")
{
echo "<center><h1><b>Please Write Something In search Box</b></h1></center>";
exit();
} }
$id = $_GET['id'];
$tbl_name = $_GET['tbl_name'];
$id_name = $_GET['id_name'];
$id_name1 = $_GET['id_name1'];
$row1_name = $_GET['row1_name'];
$row2_name = $_GET['row2_name'];
$row3_name = $_GET['row3_name'];
$row4_name = $_GET['row4_name'];
?>
<table>
<thead>
<tr>
<th><?php echo $row1_name; ?></th>
<th><?php echo $row2_name; ?></th>
<th><?php echo $row3_name; ?></a></th>
<th><?php echo $row4_name; ?></th>
</tr>
</thead>
<tbody>
<?php
$rs1 = mysqli_query($conection, "SELECT * FROM $tbl_name WHERE $id_name LIKE '%".$$id_name1."%' ");
while($row1 = mysqli_fetch_assoc($rs1)){
?>
<tr>
<td><?php echo $row1[$row1_name]; ?></td>
<td><?php echo $row1[$row2_name]; ?></td>
<td><?php echo $row1[$row3_name]; ?></td>
<td><?php echo $row1[$row4_name]; ?></td>
</tr>
<?php
}
?>
</tbody>
</table>


What is Funtion 7 Report

Funtion 7 Report used to create various reports with the MySql database in PHP. Funtion 7 Report is designed to help the user in the easiest way to make a report with all the elements from the database table. It is used by first copying the database code to an already created database in PHPMyAdmin, after which you connect to the database. in chon.php. Then insert the report folder into the web loader and run it at: LOC ALHOST. This triggered the report. There are three types of reports, and they are: