Code (HTML, php) excerpt of a checklist (form) protocol for surveillance of system and daily processing

<?php
// prelocated session_start:
ini_set('session.save_path','tmp');
session_start();

$now time();
$_SESSION['discard_after'] = date('Y-m-d H:i:s',$now 10);

$sessionfile fopen("tmp/guest.txt""w");
fputs($sessionfilesession_encode( ) );
// session_decode(fputs($sessionfile,  4096) );
fclose($sessionfile);
// end of script
?>
<?php
error_reporting
(E_ALL ^  E_NOTICE);
// ini_set('session.save_path','tmp');
session_start();
?>
<html>
    <head>
        <title>HTML/php checklist</title>
    <link rel="stylesheet" href="../style/style.css">
    </head>
    <body>
        
<h2>ToDo's</h2>
<p>
                            <form action="cksave.php" method="post">
<center><table style="width:100%; font-family:verdana;" class="w3-table-all">
  <tr style="background-color: #C0C0C0">
    <td colspan="5"><center>if marked in grey color: working days only!
</center></td>
  </tr>
<tr>
    <td colspan="4"><center>Daily / weekends / bank holidays
</center></td>
  </tr>

<tr>
    <td colspan="3"><p><b>Date: </b><?php echo date("d.m.Y");?></p>
<?php
// echo $_POST['username'];
// $_SESSION['username'] = $_POST['username'];
$_SESSION['username'] == 'username';
        if (isset(
$_SESSION['username'])) {
        echo 
'<p><b>User:</b> <input type="Text" name="username" value='.$_SESSION['username'].'></p>';
        }
        else {
        echo 
'<p><b>User:</b> <input type="Text" name="username" value="" required></p>';
        }
?>
        </td>
    <td><div align=right></div><a href="#" id="go-to-bottom" title="Go to bottom">
        <img src="../style/img/glyph/glyphicons/png/glyphicons-213-arrow-down.png"></a></td>
  </tr>

<tr>
    <td><b>Check</b></td>
        <td class="w3-hide-small"><b>ToDo</b></td>
        <td class="w3-hide-small"><b>Troubleshooting</b></td>
        <td><!-- select all boxes <input type="checkbox" name="select-all" id="select-all" --></td>
  </tr>

  <tr>
    <td class="w3-hide-small">Information for operator in morning duty <b>(following working day only!)</b></td>
    <td><a href='mailto:prod@it.at?subject=Good Morning, <?php echo date("d.m.Y");?>?cc=user@it.at
        ?body=Daily report%0Aand%0Anews' target='_blank'>Informational e-mail to PROD, cc User!</a> about errors occured, etc.</td>
        <td class="w3-hide-small"></td>
        <td>
<?php
$_SESSION
['check1'] == 'check1';
        if (isset(
$_SESSION['check1'])) {
        echo 
'<input type="checkbox" name="check1" value="check1" checked="checked" style="width:30px;height:30px;">';
        }
        else {
        echo 
'<input type="checkbox" name="check1" value="check1" style="width:30px;height:30px;">';
        }
?>
        </td>
  </tr>
  <tr>
    <td class="w3-hide-small">Check Confluence tasks to do</td>
    <td>issues pending? '<a href='https://web.it.at/jira/' target='_blank'>ToDo's</a>' </td>
        <td class="w3-hide-small">Resolve or assign.</td>
        <td>
<?php
$_SESSION
['check2'] == 'check2';
        if (isset(
$_SESSION['check2'])) {
        echo 
'<input type="checkbox" name="check2" value="check2" checked="checked" required style="width:30px;height:30px;">';
        }
        else {
        echo 
'<input type="checkbox" name="check2" value="check2" required style="width:30px;height:30px;">';
        }
?>
        </td>
  </tr>

  <tr>
    <td>Enqueues <b>DEV too <input type="checkbox" style="width:20px;height:20px;">)</b></td>
    <td class="w3-hide-small"><b>PROD: ENQ</b><br>
        <b>DEV: ENQ</b></td>
        <td class="w3-hide-small">Dequeue<br>after clearing</td>
        <td>
<?php
$_SESSION
['check3'] == 'check3';
        if (isset(
$_SESSION['check3'])) {
        echo 
'<input type="checkbox" name="check3" value="check3" checked="checked" required style="width:30px;height:30px;">';
        }
        else {
        echo 
'<input type="checkbox" name="check3" value="check3" required style="width:30px;height:30px;">';
        }
?>
        </td>
  </tr>

   <tr>
    <td>display replies and system requests (SDSF) <b>(DEV too <input type="checkbox" style="width:20px;height:20px;">)</b></td>
    <td class="w3-hide-small">'Clean up', if no urgent or immediate messages <br><b>console command</b></td>
        <td class="w3-hide-small">If required, consult internal documentation by (error) msg.</td>
        <td>
<?php
$_SESSION
['check4'] == 'check4';
        if (isset(
$_SESSION['check4'])) {
        echo 
'<input type="checkbox" name="check4" value="check4" checked="checked" required style="width:30px;height:30px;">';
        }
        else {
        echo 
'<input type="checkbox" name="check4" value="check4" required style="width:30px;height:30px;">';
        }
?>
        </td>
  </tr>

   <tr>
    <td>Outputclass I (OI) <b>(DEV too <input type="checkbox" style="width:20px;height:20px;">)</b></td>
    <td class="w3-hide-small">'Save' relevant error protocols<br><b>JES command</b></td>
        <td class="w3-hide-small">Clean up</td>
        <td>
<?php
$_SESSION
['check5'] == 'check5';
        if (isset(
$_SESSION['check5'])) {
        echo 
'<input type="checkbox" name="check5" value="check5" checked="checked" required style="width:30px;height:30px;">';
        }
        else {
        echo 
'<input type="checkbox" name="check5" value="check5" required style="width:30px;height:30px;">';
        }
?>
        </td>
  </tr>

   <tr>
    <td rowspan="2" class="w3-hide-small">abEnds <b>(DEV too <input type="checkbox" style="width:20px;height:20px;">)</b></td>
        <td><b>IWS error queue</b></td>
        <td class="w3-hide-small">Resolve occuring abEnds, care for spec. res., ENQs and issue tickets</td>
        <td>
<?php
$_SESSION
['check6'] == 'check6';
        if (isset(
$_SESSION['check6'])) {
        echo 
'<input type="checkbox" name="check6" value="check6" checked="checked" required style="width:30px;height:30px;">';
        }
        else {
        echo 
'<input type="checkbox" name="check6" value="check6" required style="width:30px;height:30px;">';
        }
?>
        </td>
  </tr>

    <tr>
    <td><b>BETA92</b></td>
    <td class="w3-hide-small">check jobs</td>
        <td>
<?php
$_SESSION
['check7'] == 'check7';
        if (isset(
$_SESSION['check7'])) {
        echo 
'<input type="checkbox" name="check7" value="check7" checked="checked" required style="width:30px;height:30px;">';
        }
        else {
        echo 
'<input type="checkbox" name="check7" value="check7" required style="width:30px;height:30px;">';
        }
?>
        </td>
  </tr>

<tr style="font-family:verdana;">
<td colspan="5" class="w3-hide-small"><p><b>Notes and comments:</b></p>
<?php
$_SESSION
['comment'] == 'comment';
        if (isset(
$_SESSION['comment'])) {
        echo 
'<input type="Text" style="width:100%" form="usrform" name="comment" value="'.$_SESSION['comment'].'">';
        }
        else {
        echo 
'<input type="Text" style="width:100%" name="comment" value="" form="usrform">';
        }
?>
</td>
    <td colspan="3" class="w3-hide-medium w3-hide-large"><p><b>Notes and comments:</b></p>
<?php
$_SESSION
['comment'] == 'comment';
        if (isset(
$_SESSION['comment'])) {
        echo 
'<input type="Text" style="width:100%" form="usrform" name="comment" value="'.$_SESSION['comment'].'">';
        }
        else {
        echo 
'<input type="Text" style="width:100%" name="comment" value="" form="usrform">';
        }
?>
</td></tr>

</table>

<h3><p style="font-family:verdana;">
<?php
echo date("d.m.Y H:i:s");
echo 
"<br>";
echo 
"<br>"?>
</p></h3>

</center>

<p><center>
<?php

// Validation/Submission:

$_SESSION['submits'] == 'submits';
        if (isset(
$_SESSION['submits'], $_SESSION['check2'], $_SESSION['check3'], $_SESSION['check4'], $_SESSION['check5'], $_SESSION['check6'], $_SESSION['check7'])) {
    echo 
'<a href="chk.php" title="Home">
    <img src="../style/img/glyph/glyphicons/png/glyphicons-21-home.png" style="height:3em;"></a>'
;
        }
        else {
        echo 
'<input type="Submit" value="Save/resolve" name="submits" style="width:210px;height:80px;font-size:150%;">';
        }
?>
<hr>
<a href="#" id="back-to-top" title="Back to top" style="height:1.5em;">
    <img src="../style/img/glyph/glyphicons/png/glyphicons-214-arrow-up.png"></a>
</center></p>
</form>
           
        <script src="../style/bs/js/jquery-3.1.1.min.js"></script>
        <script src="../style/botop.js"></script>        

    </body>
</html>

Endpoint view


PostgreSQL (php) code pattern for SELECT via associative array

<?php
  
if ($db pg_connect("host=localhost port=5432 dbname=wls user=admin password=pwd."))
  {
    
$sql "SELECT A.id, A.valueCol1, A.valueCol2, B.id, B.valueCol1 FROM tab A LEFT JOIN tab B ON A. id = B.id
            WHERE A.id='id' AND A.valueCol1 ILIKE '%
$value%' OR A.valueCol1 = B.valueCol1";
    if (
$ergebnis pg_query($db$sql)) {
      echo 
"<ul>";
      while (
$zeile pg_fetch_assoc($ergebnis)) { 
        echo 
"<li>" htmlspecialchars($zeile["id"]) .
             
": " htmlspecialchars($zeile["valueCol1"]) . "</li>";
                                                  }
      echo 
"</ul>";
                                        }
    
pg_close($db);
  } else {
    echo 
"Fehler!";
          }

// ... final embedment in an HTML, CSS and JavaScript/jQuery design ...

?>