Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5989275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:04:43+00:00 2026-05-22T23:04:43+00:00

I have this problem on my payroll processing system. Below the area where the

  • 0

I have this problem on my payroll processing system.
Below the area where the data are added is a table where the data added into the pay table are shown (except for the empID since the payroll details shown on the table must be from those that are associated to the employee that was selected.)

Payroll System image

Please refer to the link above to see image to further understand what’s written below.

*[A]*is where the user selects which employee’s payroll details be updated. After selecting the radio button and clicking the “Update Payroll Details” button, the user shall be brought to the Update Payroll Details page which is B.

*[B]*The upper part is where the user enters all the payroll details associated to the employee selected. Once the user clicks save the data shall be added to the database (pay table) and these details shall be shown on the table located below the input area.

However, although I have data in my pay table it wouldn’t seem to display on the table below that’s why the message shows “No Records Found”. Here is my code for the entire Update Payroll Data page:

elseif ($_GET["k"]==41)
{
    session_start();
    if (isset($_SESSION["uname"]))
    {
            $empID=$_POST["empID"];
            $aBulan=0; $aPetsa=0; $aTuig=0; $tuigYana=date("Y"); $tuigHadto=$tuigYana-5;

            $anoBulan=array("January","February","March","April","May","June","July","August","September","October","November","December");


            if ($_POST["sButton"]=="Update Payroll Details")
            {
                    $anoSulod ="Payroll Details<hr>";
                    $anoSulod.="<form method='post' action='logged.php?k=42'>";
                    $anoSulod.="<input type='hidden' name='empID' value='".$empID."'>";
                    $anoSulod.="<table>";
                    $anoSulod.="    <tr><td>Name of employee : </td><td>".accessDatabase::hinoEmployee($empID)."</td></tr>";
                    $anoSulod.="    <tr>";
                    $anoSulod.="            <td>For the month ending : </td>";
                    $anoSulod.="            <td>";

// Kanan month ini dinhi
                    $anoSulod.="                    <select name='bBulan'>";
                    for ($bulan=1; $bulan<=12; $bulan++)
                    {
                        if ($bulan==$aBulan) $anoSulod.="       <option value='".$bulan."' selected>".$anoBulan[$bulan-1];
                        else $anoSulod.="       <option value='".$bulan."'>".$anoBulan[$bulan-1];
                    }
                    $anoSulod.="                    </select>&nbsp;";


// Kanan year ini dinhi
                    $anoSulod.="                    <select name='bTuig'>";
                    for ($tuig=$tuigYana; $tuig>=$tuigHadto; $tuig--)
                    {
                        if ($tuig==$aTuig) $anoSulod.=" <option value='".$tuig."' selected>".$tuig;
                        else $anoSulod.="       <option value='".$tuig."'>".$tuig;
                    }
                    $anoSulod.="                    </select>";
                    $anoSulod.="            </td>";
                    $anoSulod.="    <tr>";
                    $anoSulod.="    <tr><td>Basic Salary : PhP</td><td><input type='text' name='bs'></td></tr>";
                    $anoSulod.="    <tr><td>PERA/ACA : PhP</td><td><input type='text' name='pa'></td></tr>";
                    $anoSulod.="    <tr><td>PAIC : PhP</td><td><input type='text' name='pc'></td></tr>";
                    $anoSulod.="    <tr><td>REL : PhP</td><td><input type='text' name='rl'></td></tr>";
                    $anoSulod.="    <tr><td>GSIS Premium/Loans : PhP</td><td><input type='text' name='gs'></td></tr>";
                    $anoSulod.="    <tr><td>HDMF Premium/Loans : PhP</td><td><input type='text' name='hd'></td></tr>";
                    $anoSulod.="    <tr><td>Coop Loans : PhP</td><td><input type='text' name='cl'></td></tr>";
                    $anoSulod.="    <tr><td>Union Dues : PhP</td><td><input type='text' name='ud'></td></tr>";
                    $anoSulod.="    <tr><td>Withholding Tax : PhP</td><td><input type='text' name='tx'></td></tr>";
                    $anoSulod.="    <tr><td colspan='2'><hr></tr>";
                    $anoSulod.="    <tr><td colspan='2'><input type='submit' value='Save'></tr>";
                    $anoSulod.="    <tr><td colspan='2'><hr></tr>";
                    $anoSulod.="    <tr>";
                    $anoSulod.="     <td colspan='2'>";
                    $anoSulod.="     <table border='1'>";

                    $anoSulod.="     <caption>Payroll Details</caption>";
                    $anoSulod.="     <tr>";
                    $anoSulod.="     <td>&nbsp;</td>";
                    $anoSulod.="     <td>Pay period</td>";
                    $anoSulod.="     <td>Basic Salary</td>";
                    $anoSulod.="     <td>PERA/ACA</td>";
                    $anoSulod.="     <td>PAIC</td>";
                    $anoSulod.="     <td>REL</td>";
                    $anoSulod.="     <td>GSIS Premium/Loans</td>";
                    $anoSulod.="     <td>HDMF Premium/Loans</td>";
                    $anoSulod.="     <td>Coop Loans</td>";
                    $anoSulod.="     <td>Union Dues</td>";
                    $anoSulod.="     <td>Withholding Tax</td>";
                    $anoSulod.="     </tr>";

                    $k="select b.payID, a.empname, date_format(b.date,'%M %Y') as date, b.bs, b.pa, b.pc, b.rl, b.gs, b.hd, b.cl, b.ud, b.tx, from emp a, pay b where a.empID=b.empID and a.empID=".$empID;
                    $q=mysql_query($k);
                    if (mysql_num_rows($q)>0)
                    {
                        while ($akonRows=mysql_fetch_array($q))
                        {
                            $anoSulod.="    <tr>";
                            $anoSulod.="     <td><input type='radio' name='payID' value='".$akonRows["payID"]."'></td>";
                            $anoSulod.="     <td>".$akonRows["date"]."</td>";
                            $anoSulod.="     <td>".$akonRows["bs"]."</td>";
                            $anoSulod.="     <td>".$akonRows["pa"]."</td>";
                            $anoSulod.="     <td>".$akonRows["pc"]."</td>";
                            $anoSulod.="     <td>".$akonRows["rl"]."</td>";
                            $anoSulod.="     <td>".$akonRows["gs"]."</td>";
                            $anoSulod.="     <td>".$akonRows["hd"]."</td>";
                            $anoSulod.="     <td>".$akonRows["cl"]."</td>";
                            $anoSulod.="     <td>".$akonRows["ud"]."</td>";
                            $anoSulod.="     <td>".$akonRows["tx"]."</td>";
                            $anoSulod.="    </tr>";
                        }
                    }
                    else
                    {
                        $anoSulod.="    <tr>";
                        $anoSulod.="     <td colspan='11' align='center'>No records found</td>";
                        $anoSulod.="    </tr>";
                    }


                    $anoSulod.="     </table>";

                    $anoSulod.="     </td>";
                    $anoSulod.="    </tr>";
                    $anoSulod.="</table>";
                    $anoSulod.="</form>";
                    $kadamoTD=2;
           }


      }
}

Please help. I really can’t figure out what went wrong. Please do… Thanks so much!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T23:04:43+00:00Added an answer on May 22, 2026 at 11:04 pm

    Add the error checking for every mysql_query. At least make a call like:

    mysql_query($k) or die(mysql_error());

    Was: Don’t expect that PHP functions (e.g. date_format) will work inside the SQL query. (Comments say date_format is a MySQL function too)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this problem where I can't get my dynamic data web app to
I have this problem: Warning: #1265 Data truncated for column I got a form
I have this problem I'm hoping someone knows the answer to. I have an
everybody; I have this problem in asp.net, I have a page where I insert
I have seen this problem arise in many different circumstances and would like to
I have faced this problem quite often during the last couple of months, during
I enjoy developing algorithms using the STL, however, I have this recurring problem where
I have hit upon this problem about whether to use bignums in my language
Consider this problem: I have a program which should fetch (let's say) 100 records
I have an idea for how to solve this problem, but I wanted to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.