urtrivedi 276 Nearly a Posting Virtuoso

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

urtrivedi 276 Nearly a Posting Virtuoso

I think wriring html code within script is creating problem, keeep document.write fucntion comented or write them with with normal/standard html

urtrivedi 276 Nearly a Posting Virtuoso
SELECT MemberID, 
         COUNT(MemberID)  cnt
    FROM YourTable 
GROUP BY MemberID
order by cnt desc 
limit 0,1
simplypixie commented: Don't answer someone else's question when they have hijacked a thread -2
urtrivedi 276 Nearly a Posting Virtuoso
<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

mushahidh commented: I just want to exclude the action column when exporting to excel. you didn't get my point. +0
urtrivedi 276 Nearly a Posting Virtuoso

if you press browser refresh button it is not possible to retain values.

urtrivedi 276 Nearly a Posting Virtuoso

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

mmcdonald commented: What i've done works fine but thanks for the reply.... +0
urtrivedi 276 Nearly a Posting Virtuoso

ok

urtrivedi 276 Nearly a Posting Virtuoso

Look at the link, it is something readymade. Check whether it is useful in your case or not.
http://coppermine-gallery.net/

Netcode commented: works with mySQL -1
urtrivedi 276 Nearly a Posting Virtuoso

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
.
.
urtrivedi 276 Nearly a Posting Virtuoso

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.

urtrivedi 276 Nearly a Posting Virtuoso

That sentence is copied from php manual