its not error, its warning,
YOu can disable warning in your php.ini configuration file and restart apache service
Make sure following line is off instead of on
display_errors = Off
its not error, its warning,
YOu can disable warning in your php.ini configuration file and restart apache service
Make sure following line is off instead of on
display_errors = Off
I think wriring html code within script is creating problem, keeep document.write fucntion comented or write them with with normal/standard html
SELECT MemberID,
COUNT(MemberID) cnt
FROM YourTable
GROUP BY MemberID
order by cnt desc
limit 0,1
<div class="row" style="margin-left:20px;">
<div class="grid_4">
<div class="da-panel collapsible">
<input type="button" class="btn btn-success" onclick="tableToExcel('testTable', 'W3C Example Table')" value="Export to Excel" style="float:right">
<div class="da-panel-content">
<div class="da-panel-title" style="border-top:1px solid #ccc;border-bottom:1px solid #ccc">
<h3 style="padding-left:10px;font-weight:bold;">Staff Training Information</h3></div>
<table class="da-table da-ex-datatable-numberpaging" id="testTable" width="100%">
<thead width="100%">
<tr>
<th width="10%">Staff ID</th>
<th width="10%">Name</th>
<th width="10%">Location</th>
<th width="10%">POCT Test</th>
<th width="10%">Initial Training Date</th>
<th width="10%">Annual Competency Date</th>
<th width="10%">Competency Type</th>
<th width="1%">Next Competency Date</th>
</tr>
</thead>
<tbody width="100%">
<?php
include_once('database.php');
$pdo = Database::connect();
$sql = 'SELECT * FROM competency';
foreach ($pdo->query($sql) as $row) {
$id = $row['staff_id'];
echo '<tr>';
echo '<td width="10%">'. $row['staff_id'] . '</td>';
$sql1 = "SELECT *FROM staff WHERE StaffID='$id'";
foreach($pdo->query($sql1) as $res)
{
echo '<td width="10%">'. $res['StaffName'] . '</td>';
}
echo '<td width="10%">'. $row['location'] . '</td>';
?>
<td width="10%">
<?php
$s = $row['poct_test'];
$val = explode(" ",$s);
for ($i=0; $i<sizeof($val); $i++)
{
$v = $val[$i];
echo $v."<br/>";
}
?>
</td>
<?php
echo '<td width="10%">'. $row['date_of_initial_training'] . '</td>';
echo '<td width="10%">'. $row['annual_competency'] . '</td>';
echo '<td width="10%">'. $row['type_of_competency'] . '</td>';
echo '<td width="1%">'. $row['next_competency'] . '</td>';
echo '</td>';
echo '</tr>';
}
Database::disconnect();
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
You need to remove line 21 from your code and all lines from line 59 to 67
if you press browser refresh button it is not possible to retain values.
following line
update-server.php?server=$server_id
it should be like this when u click in address bar
update-server.php?server=12
it must be some number or value and not variable name
Look at the link, it is something readymade. Check whether it is useful in your case or not.
http://coppermine-gallery.net/
document.createElement("div");
DO no create new div, rather use existing
.
.
.
var divTag = document.getElementById("my_div");
// divTag.id = "div";// do change id of your div
.
.
.
//keep rest code as it is
.
.
It will always post what ever is on your form. So you must check whether value>0 then add that item is value is 0 or null then ignore that item.
That sentence is copied from php manual