sample display loof phprunner




sample display loof phprunner

<?php
//$db_host = ''; // Server Name
//$db_user = 'root'; // Username
//$db_pass = ''; // Password
//$db_name = 'r'; // Database Name


//$conn = mysqli_connect($db_host, $db_user, $db_pass, $db_name);
//if (!$conn) {
//die ('Failed to connect to MySQL: ' . mysqli_connect_error());
//}






ini_set("display_errors","1");



header("Expires: Thu, 01 Jan 1970 00:00:01 GMT");
header("Pragma: no-cache");
header("Cache-Control: no-cache");



include("include/dbcommon.php");
if(!@$_SESSION["UserID"])

{
        header("Location: login.php");
        return;
}
?>


<?php








   $ReqNo = $_GET['user'];
 
 
   $sql = "
 
   select * from items where REQNO = (SELECT REQNO FROM SUPPLIER WHERE ReqNo='".$ReqNo."')";
 
 
 





?>

<html>
<head>
<title>List</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type="text/css">
body {
font-size: 15px;
color: #343d44;
font-family: "segoe-ui", "open-sans", tahoma, arial;
padding: 0;
margin: 0;
}
table {
margin: auto;
font-family: "Lucida Sans Unicode", "Lucida Grande", "Segoe Ui";
font-size: 12px;
}

h1 {
margin: 20px auto 0;
text-align: center;
text-transform: uppercase;
font-size: 17px;
}

table td {
transition: all .5s;
}

/* Table */
.data-table {
border-collapse: collapse;
font-size: 14px;
min-width: 537px;
}

.data-table th,
.data-table td {
border: 1px solid #000;
padding: 3px 5px;
}
.data-table caption {
margin: 7px;
}

/* Table Header */
.data-table thead th {
background-color: #424242;
color: #FFFFFF;
border-color: #6ea1cc !important;
text-transform: uppercase;
}

/* Table Body */
.data-table tbody td {
color: #353535;
}
.data-table tbody td:first-child,
.data-table tbody td:nth-child(4),
.data-table tbody td:last-child {
text-align: center;
}

.data-table tbody tr:nth-child(odd) td {
background-color: #ffffff;
}
.data-table tbody tr:hover td {
background-color: #;
border-color: #;
}

/* Table Footer */
.data-table tfoot th {
background-color: #e5f5ff;
text-align: center;
}
.data-table tfoot th:first-child {
text-align: center;
}
.data-table tbody td:empty
{
background: #d9230f;
}

.data-table tbody tr:nth-child(odd) td:empty{
    background-color: #d9230f;
}



</style>
</head>
<body>

<table class="data-table">


<?php
$no = 1;
$total = 0;


   $rs = CustomQuery($sql);


while ($data = db_fetch_array($rs))
{

if($no == 1){

echo ' <thead><center>
<tr>
<th>No</th>
<th>ReqNo</th>
<th>Barcode</th>
<th>brand</th>



</tr>
</center></thead>
<tbody>';
}

echo '<tr>
<td>'.$no.'</td>
<td>'.$data['ReqNo'].'</td>
<td>'.$data['barcode'].'</td>
<td>'.$data['brand'].'</td>




</tr>';

$no++;
}?>
<td width="10"></tbody>

</table>





  <br/>







</body>
</html>

Comments