Categories
C#

Odd and Even Numbers in C#

I wrote this simple program using C# programming language to ask the user to give a number and then the program will check and determine whether the given number is an odd or even number.

I am currently accepting programming work inventory system, enrollment system, accounting system, point of sale, school programming assignments and projects, payroll system, information system, website design and development using WordPress, IT projects, school and application development, programming projects, thesis, and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details. If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com. My mobile number here in the Philippines is 09173084360. My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675.


Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking, and Arduino Project development at a very affordable price. My personal website is http://www.jakerpomperada.com

Sample Program Output
Sample Program Output

Program Listing

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Odd_and_Even_Numbers
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            int a = 0;

            a = Convert.ToInt32(textBox1.Text);



            if (a % 2 == 0)

            {

                MessageBox.Show("The given number " + a + " is a Even Number.",

                 "The Result");

            }
            else

            {



                MessageBox.Show("The given number " + a + " is a Odd Number.",

                 "The Result");

            }


        }

        private void button2_Click(object sender, EventArgs e)
        {
            textBox1.Text = "";
            textBox1.Focus();
        }
    }
}
Categories
C

Volume of a Sphere Converter in C

A simple program that I wrote using C programming language to compute the volume of a sphere.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, IT projects, school and application development, programming projects, thesis, and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details. If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.My mobile number here in the Philippines is 09173084360. My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675.

Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking, and Arduino Project development at a very affordable price. My personal website is http://www.jakerpomperada.com

My programming website is http://www.jakerpomperada.blogspot.com I am also a book author you can purchase my books on computer programming and information technology in the following links below. https://www.unlimitedbooksph.com/

Sample Program Output

Program Listing

#include <stdio.h>

#define PI  3.14

int main()
{   
    float volume_sphere = 0.00;
    float radius = 0.00;
   	printf("\n\n");
	printf("\tVolume of a Sphere Converter");
	printf("\n\n");
	printf("\tEnter Radius Value : ");
    scanf("%f",&radius);

    /* Compute the volume of Sphere */
    
    volume_sphere = (4.0/3.0)*(PI*radius*radius*radius);
    
	printf("\n\n");
	printf("\tThe Volume of Sphere is %5.2f.",volume_sphere);
	printf("\n\n");
	printf("\tEnd of Program");
	printf("\n");
}
Categories
C++

Running Sum of Numbers Using Ordinal Indicators in C++

I wrote this simple program to demonstrate how to write a running sum of number using ordinal numbers in C++ programming language.
I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, IT projects, school and application development, programming projects, thesis, and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details. If you want to advertise on my website kindly contact me also in my email address also. Thank you.


My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.My mobile number here in the Philippines is 09173084360. My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675.


Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking, and Arduino Project development at a very affordable price. My personal website is http://www.jakerpomperada.com


My programming website is http://www.jakerpomperada.blogspot.comI am also a book author you can purchase my books on computer programming and information technology in the following links below.https://www.unlimitedbooksph.com/

Sample Program Output

Program Listing
Program Listing
// ordinal.cpp
// Jake Rodriguez Pomperada
// May 26, 2020      Tuesday    10:51 PM

 #include <iostream>
 #include <string>

 using namespace std;
 
string ordinal(int i)
{
	
	
int mod100 = 0, mod10 = 0;

mod100 = (i % 100);
mod10 = (i % 10);
 
if (mod10 == 1 && mod100 != 11) {
return "st";
} else if (mod10 == 2 && mod100 != 12) {
 return "nd";
}
else if (mod10 == 3 && mod100 != 13) {
return "rd";
} else {
return "th";
 }
}

 int main()
 {
 
   int num_items = 0, sum = 0, num;
   
   cout <<"\n\n";
   cout <<"\tRunning Sum of Numbers Using Ordinal Indicators in C++";
   cout <<"\n\n";
   cout << "\tHow many items: ";
   cin >> num_items;
   for (int i = 1; i <= num_items; ++i)
  {
    cout << "\tGive value in the " << i << ordinal(i) << " item: ";
    cin >> num;
    sum += num;
   cout << "\tThe running sum is: " << sum << '\n';
   }
   cout <<"\n";
   cout <<"\tEnd of the Program";
   cout <<"\n";
 }
Categories
Java

Leap Year Checker Using OOP in Java

I wrote this program to accept the user input a year and then the program will check if the given year is a leap year or not using object-oriented programming in Java.


I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, IT projects, school and application development, programming projects, thesis, and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details. If you want to advertise on my website kindly contact me also in my email address also. Thank you.


My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.My mobile number here in the Philippines is 09173084360. My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675.


Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking, and Arduino Project development at a very affordable price. My personal website is http://www.jakerpomperada.com
My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.https://www.unlimitedbooksph.com/

Program Listing

package oop_java;

import java.util.Scanner;
/**
 * NetBeans IDE 8.2
 * @author Mr. Jake R. Pomperada
 * March 22, 2018  Thursday
 * Bacolod City, Negros Occidental
 */

public class LeapYear {
  public int year;
  public boolean leap = false;
  public String result;

 public void getdata() {
  Scanner input = new Scanner(System.in);
  System.out.println();
  System.out.println(" Leap Year Checker Using OOP");
  System.out.println();
  System.out.print("Enter Year :  ");
  year = input.nextInt();
  
 }
 public void checkyear() {
    if(year % 4 == 0)
        {
            if( year % 100 == 0)
            {
                // year is divisible by 400, hence the year is a leap year
                if ( year % 400 == 0)
                    leap = true;
                else
                    leap = false;
            }
            else
                leap = true;
        }
        else
            leap = false;

        if(leap)
            result =  year  + " is a leap year.";
        else
             result =  year + " is not a leap year.";
    }
     
  
 public void display() {
  System.out.println();
  System.out.println("===== DISPLAY RESULT =====");
  System.out.println();
  System.out.println(result);
  System.out.println();
 }
 public static void main(String args[]) {
   LeapYear year = new LeapYear();
  year.getdata();
  year.checkyear();
  year.display();
 }
}
Categories
Python

Decimal To Binary in Python

Write a program that will ask the user to input integer value and then, the program will compute the cube value of the given number using a function and display the computed result on the screen.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, IT projects, school and application development, programming projects, thesis, and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details. If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675.

Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.

https://www.unlimitedbooksph.com/

Program Listing

def convert_binary(values):
   if values > 1:
     convert_binary(values//2)
     print(values % 2,end ='');

def my_program():
   print();
   print("\tDECIMAL TO BINARY CONVERTER");
   print();
   decimal = int(input("\tEnter a Number: "));
   print();
   print('\tThe number {0} in Decimal is equivalent to '.format(decimal));
   convert_binary(decimal);
   print(" in binary.");
   print();
   repeat = input('\tDo you want to continue ? (Y/N) : ');

   if repeat.upper() == "N":
       print();
       print("\tEND OF PROGRAM");
       quit
   if repeat.upper() == "Y":
       my_program();

if __name__ == '__main__':
       my_program();


Categories
Python

Calculator in Python

I wrote this simple calculator in Python programming language while writing my own book and also to learn the language itself.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, IT projects, school and application development, programming projects, thesis, and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details. If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675.

Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.

https://www.unlimitedbooksph.com/

Program Listing

def menu():
    print();
    print("\t\t Simple Calculator Program");
    print();
    print("\tWritten By Jake R. Pompreada")
    print();
    print("\t1. Addition");
    print("\t2. Subtraction");
    print("\t3. Multiplication");
    print("\t4. Division");
    print("\t5. Quit Program");
    print();
    return int(input("\tChoose your option: "));


def add(a, b):
    print();
    print("\t",a, "+", b, "=", a + b);


def sub(a, b):
    print();
    print("\t",a, "-", b, "=", a - b);


def mul(a, b):
    print();
    print("\t",a, "*", b, "=", a * b);


def div(a, b):
    print();
    print("\t",a, "/", b, "=", a / b);


loop = 1
choice = 0
while loop == 1:
    choice = menu()
    if choice == 1:
        print();
        add(int(input("\tAdd this: ")), int(input("\tto this: ")))
    elif choice == 2:
        print();
        sub(int(input("\tSubtract this: ")), int(input("\tfrom this: ")))
    elif choice == 3:
        print();
        mul(int(input("\tMultiply this: ")), int(input("\tby this: ")))
    elif choice == 4:
        print("\n");
        div(int(input("\tDivide this: ")), int(input("\tby this: ")))
    elif choice == 5:
        loop = 0
print();
print("\tThank you for using this program.");
print();
print("\tEND OF PROGRAM");


Categories
PHP

Grade Checker in PHP

A simple grade checker program that I wrote using PHP programming language.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, IT projects, school and application development, programming projects, thesis, and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details. If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675.

Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.

https://www.unlimitedbooksph.com/

Program Listing

<!doctype html>
<html>
	<head>
		<title>Grade Checker in PHP</title>
	</head>
	<body>
		<form method="POST" action="">		
			<h2>Grade Checker in PHP</h2>
<?php
$grade="";
$remark="?";
if(isset($_POST['remark'])){
	$grade=$_POST['grade'];
	if($grade < 75){
		$remark="Failing Grade!";
	}
	else{
		$remark="Passing Grade!";
	}
}
?>
			<p>
				Final Grade: <input type="text" name="grade" size="8" value="<?=$grade;?>"/>
				<input type="submit" name="remark" value="Remark"/>
			</p>
			
			<p>Remark: <?=$remark;?></p>
		</form>
	</body>
</html>

Categories
Perl

Personnel Information System in Perl and MySQL

I wrote these simple crud applications that I called Personnel Information System in Perl and MySQL that can add, edit, update, view and delete records of personnel. It is a menu-driven program that is written in console-based in Perl and the backend in MySQL database I hope you will find my work useful.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, IT projects, school and application development, programming projects, thesis, and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details. If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675.

Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.

https://www.unlimitedbooksph.com/

Sample Program Output
# menu.pl
# Author   : Jake R. Pomperada,MAED-IT,MIT
# Date     : April 32, 2020   Tuesday   1:03 PM
# Location : Bacolod City, Negros Occidental
# Email    : jakerpomperada@gmail.com
# Websites : http://www.jakerpomperada.com
#            http://www.jakerpomperada.blogspot.com


use DBI;

$myConnection = DBI->connect('DBI:mysql:records:localhost','root','');


# infinite loop for menu
while ( 1 )
{
	printf("\n\n");
	printf("\t\t===== MAIN MENU ======\n\n");
	printf"\tPersonnel Information System in Perl and MySQL\n\n";
	printf("\tCreated By Mr. Jake R. Pomperada,MAED-IT,MIT\n");
	printf("\n");
	print "\t[1] Add Personnel Record\n";
	print "\t[2] Update Personnel Record\n";
	print "\t[3] Delete Personnel Record\n";
	print "\t[4] View Personnel Record\n";
	print "\t[5] Quit Program\n\n";
	printf("\tSelect the number in the menu : ");
	my $option=<STDIN>;# get input
	chomp($option);# remove "enter key"

	# redirect options
	if ( $option == 1 )
	{
	# set the value of your SQL query
	$query1 = "INSERT INTO persons (name,age,address) 
			values (?, ?, ?) ";

	# prepare your statement for connecting to the database
	$statement1 = $myConnection->prepare($query1);

	printf("\n");
	printf("\t\t===== ADD RECORD =====");
	printf("\n\n");
	print "\tEnter Persons Name    : ";
	chomp($name =<>);
	printf("\n");
	print "\tEnter Persons Age      : ";
	chomp($age =<>);
	printf("\n");
	print "\tEnter Persons Address  : ";
	chomp($address =<>);

	$name_saved = uc $name;
	$address_saved = uc $address;

	# execute your SQL statement
	$statement1->execute($name_saved,$age,$address_saved);
	printf("\n\n");
	printf("\tRecord has been saved.");
	printf("\n\n");
	$statement1->finish();
	}
	elsif ( $option == 2 )
	{
		# update statement
	$query2 = "UPDATE persons SET 
                 name =?,
                 age =? ,
                 address=?  
                 WHERE id = ?";
			

	# prepare your statement for connecting to the database
	$statement2 = $myConnection->prepare($query2);

	printf("\n");
	printf("\t\t===== UPDATE RECORD =====");
	printf("\n\n");
	print "\tEnter Persons ID    : ";
	chomp($id =<>);
	printf("\n");
	print "\tEnter Persons Name    : ";
	chomp($name =<>);
	printf("\n");
	print "\tEnter Persons Age      : ";
	chomp($age =<>);
	printf("\n");
	print "\tEnter Persons Address  : ";
	chomp($address =<>);

	$name_saved = uc $name;
	$address_saved = uc $address;

	# execute your SQL statement
	$statement2->execute($name_saved,$age,$address_saved,$id);
	printf("\n\n");
	printf("\tRecords has been updated successfully.");
	printf("\n\n");

	}
	elsif ( $option == 3 )
	{
		# set the value of your SQL query
	$query3 = "DELETE FROM persons WHERE id = ? ";

	# prepare your statement for connecting to the database
	$statement3 = $myConnection->prepare($query3);

	printf("\n");
	printf("\t\t===== DELETE RECORD =====");
	printf("\n\n");
	print "\tEnter Persons ID    : ";
	chomp($id =<>);
	printf("\n\n");
	$statement3->execute($id);
	printf("\tRecord deleted successfully");

	}
	elsif ( $option == 4 )
	{
	$query4 = $myConnection->prepare('SELECT * FROM persons');
	$result4 = $query4->execute();

	printf("\n");
	printf("\t\t===== VIEW ALL RECORD =====");
	# retrieve the records from the table Persons
	printf("\n\n");
	
while(  my $ref = $query4->fetchrow_hashref() ) {
		printf("\tID       :  $ref->{'id'} \n");
        printf("\tNAME     :  $ref->{'name'} \n");
        printf("\tAGE      :  $ref->{'age'} \n");
		printf("\tADDRESS  :  $ref->{'address'} \n\n");

    }
  }  
	elsif ( $option == 5 )
	{
		printf("\n\n");
		printf("\tExiting the program. Thank you for using this Program.\n");
		last;
	}
	
	else
	{
		print "Invalid Option\n. Try Again Please.";
	}
}

-- phpMyAdmin SQL Dump
-- version 4.0.4.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Apr 21, 2020 at 07:05 AM
-- Server version: 5.6.11
-- PHP Version: 5.5.1

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `records`
--

-- --------------------------------------------------------

--
-- Table structure for table `persons`
--

CREATE TABLE IF NOT EXISTS `persons` (
  `id` int(15) NOT NULL AUTO_INCREMENT,
  `name` varchar(200) NOT NULL,
  `age` int(3) NOT NULL,
  `address` varchar(200) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=10 ;

--
-- Dumping data for table `persons`
--

INSERT INTO `persons` (`id`, `name`, `age`, `address`) VALUES
(2, 'Julianna Rae Pomperada', 6, 'Eroreco, Bacolod City'),
(3, 'Jacob Samuel Pomperada', 7, 'Eroreco Subd.,Bacolod City'),
(7, 'BILL GATES', 65, 'ONE MICROSOFT WAY, WASHINGTON USA'),
(8, 'JAKE POMPERADA', 41, 'PUROK PAG-ASA,BARANGAY ALIJIS 6100 BACOLOD CITY, NEGROS OCCIDENTAL'),
(9, 'MA. JUNALLIE POMPERADA', 48, '#25-31 VICTORIA MALAGA STREET, ERORECO SUBD. BRGY. MANDALAGAN BACOLOD CITY,NEGROS OCCIDENTAL');

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

Categories
JavaScript

Printing a Report Using JavaScript

Here is a code that I wrote to print a report using JavaScript and PHP in a web page. I hope this code will help you learned and understand how to use JavaScript to print a report.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, IT projects, school and application development, programming projects, thesis, and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details. If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.
My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675.

Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.
My personal website is http://www.jakerpomperada.com

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.

https://www.mindshaperspublishing.com/ https://www.unlimitedbooksph.com/

Program Listing


<?php 
error_reporting(0);

	$servername = "localhost";
	$username = "root";
	$password = "";
    $dbname = "hris";
    
    $db = new mysqli($servername, $username, $password, $dbname);
    
	if (isset($_GET['print'])) {
	    $id = $_GET['print'];
       $update = true;
        // personal info
        //$record = mysqli_query($db, "SELECT * FROM tbl_p_info  WHERE employee_id=$id");
		$record = mysqli_query($db,"SELECT * FROM `tbl_p_info` Where `tbl_p_info`.`employee_id` = '$id'");

		if (count($record) == 1 ) {
			$n = mysqli_fetch_array($record);
			$surname = $n['surname'];
            $first_name = $n['first_name'];
            $middle_name = $n['middle_name'];
            $name_extension = $n['name_extension'];
            $date_birth = $n['date_birth'];
            $place_of_birth = $n['place_of_birth'];
            $sex = $n['sex'];
            $civil_status = $n['civil_status'];
            $height_m = $n['height_m'];
            $weight_m = $n['weight_m'];
            $blood_type = $n['blood_type'];
            $gsis_id_no = $n['gsis_id_no'];
            $pagibig_id_no = $n['pagibig_id_no'];
            $philhealth_no = $n['philhealth_no'];
            $sss_no = $n['sss_no'];
            $tin_no = $n['tin_no'];
            $agency_employee_no = $n['agency_employee_no'];
            $citizenship = $n['citizenship'];
            $country = $n['country'];
            $dual_citizenship = $n['dual_citizenship'];
            $residential_house_block_lot_no = $n['residential_house_block_lot_no'];
            $residential_street = $n['residential_street'];
            $residential_subdivision_village = $n['residential_subdivision_village'];
            $residential_barangay = $n['residential_barangay'];
            $residential_city_municipality = $n['residential_city_municipality'];
            $residential_province = $n['residential_province'];
            $residential_zipcode = $n['residential_zipcode'];
            $permanent_house_block_lot_no = $n['permanent_house_block_lot_no'];
            $permanent_street = $n['permanent_street'];
            $permanent_subdivision_village = $n['permanent_subdivision_village'];
            $permanent_barangay = $n['permanent_barangay'];
            $permanent_city_municipality = $n['permanent_city_municipality'];
            $permanent_province = $n['permanent_province'];
            $permanent_zipcode = $n['permanent_zipcode'];
            $telephone_no = $n['telephone_no'];
            $mobile_no = $n['mobile_no'];
            $email_address = $n['email_address'];
        }

        if ($sex ==='Male'){
            $sexy = 'checked';
            $sexn = 'no';
        } else {
            $sexy = 'no';
            $sexn = 'checked';
        }

        if ($civil_status ==='Single'){
            $civil_statuss = 'checked';
            $civil_statusm = 'no';
            $civil_statusw = 'no';
            $civil_statusse = 'no';
            $civil_statuso = 'no';
          
        } elseif ($civil_status ==='Married'){
            $civil_statuss = 'no';
            $civil_statusm = 'checked';
            $civil_statusw = 'no';
            $civil_statusse = 'no';
            $civil_statuso = 'no';
        } elseif ($civil_status ==='Widowed'){
            $civil_statuss = 'no';
            $civil_statusm = 'no';
            $civil_statusw = 'checked';
            $civil_statusse = 'no';
            $civil_statuso = 'no';
        } elseif ($civil_status ==='Separated'){
            $civil_statuss = 'no';
            $civil_statusm = 'no';
            $civil_statusw = 'no';
            $civil_statusse = 'checked';
            $civil_statuso = 'no';
        } else{
            $civil_statuss = 'no';
            $civil_statusm = 'no';
            $civil_statusw = 'no';
            $civil_statusse = 'no';
            $civil_statuso = 'checked';
        }

        if ($citizenship ==='Filipino'){
            $citizenshipy = 'checked';
            $citizenshipn = 'no';
        } else {
            $citizenshipy = 'no';
            $citizenshipn = 'checked';
        }

        if ($dual_citizenship ==='By Birth'){
            $dual_citizenshipy = 'checked';
            $dual_citizenshipn = 'no';
        } else {
            $dual_citizenshipy = 'no';
            $dual_citizenshipn = 'checked';
        }
        
        // spouse
        $record1 = mysqli_query($db, "SELECT * FROM tbl_spouse  WHERE employee_id=$id");

		if (count($record1) == 1 ) {
			$s = mysqli_fetch_array($record1);
			$spouses_surname = $s['spouses_surname'];
            $sfirst_name = $s['first_name'];
            $smiddle_name = $s['middle_name'];
            $sname_extension = $s['name_extension'];
            $soccupation = $s['occupation'];
            $semployer_business_name = $s['employer_business_name'];
            $sbusiness_address = $s['business_address'];
            $stelephone_no = $s['telephone_no'];
        }
        
        // family fathers
        $record2 = mysqli_query($db, "SELECT * FROM tbl_family WHERE employee_id=$id and relationship = 'Father' LIMIT 0,1");

		if (count($record2) == 1 ) {
			$f = mysqli_fetch_array($record2);
			$frelationship = $f['relationship'];
            $fsurname = $f['surname'];
            $ffirst_name = $f['first_name'];
            $fmiddle_name = $f['middle_name'];
            $fname_extension = $f['name_extension'];
            $fmaidenname = $f['maidenname'];    
        }
        
        // family fathers
        $record3 = mysqli_query($db, "SELECT * FROM tbl_family WHERE employee_id=$id and relationship = 'Mother'");

		if (count($record3) == 1 ) {
			$fm = mysqli_fetch_array($record3);
			$fmrelationship = $fm['relationship'];
            $fmsurname = $fm['surname'];
            $fmfirst_name = $fm['first_name'];
            $fmmiddle_name = $fm['middle_name'];
            $fmname_extension = $fm['name_extension'];
            $fmmaidenname = $fm['maidenname'];    
        }
        
        // family children 0
        $record4 = mysqli_query($db, "SELECT * FROM tbl_children WHERE employee_id=$id LIMIT 0,1");

		if (count($record4) == 1 ) {
			$fc = mysqli_fetch_array($record4);
			$fcname_of_children = $fc['name_of_children'];
            $fcdate_of_birth = $fc['date_of_birth'];
        }

         // family children 1
        $record5 = mysqli_query($db, "SELECT * FROM tbl_children WHERE employee_id=$id LIMIT 1,1");

		if (count($record5) == 1 ) {
			$fc = mysqli_fetch_array($record5);
			$fc1name_of_children = $fc['name_of_children'];
            $fc1date_of_birth = $fc['date_of_birth'];
        }

        // family children 2
        $record6 = mysqli_query($db, "SELECT * FROM tbl_children WHERE employee_id=$id LIMIT 2,1");

		if (count($record6) == 1 ) {
			$fc = mysqli_fetch_array($record6);
			$fc2name_of_children = $fc['name_of_children'];
            $fc2date_of_birth = $fc['date_of_birth'];
        }

        // family children 3
        $record7 = mysqli_query($db, "SELECT * FROM tbl_children WHERE employee_id=$id LIMIT 3,1");

		if (count($record7) == 1 ) {
			$fc = mysqli_fetch_array($record7);
			$fc3name_of_children = $fc['name_of_children'];
            $fc3date_of_birth = $fc['date_of_birth'];
        }

        // family children 4
        $record8 = mysqli_query($db, "SELECT * FROM tbl_children WHERE employee_id=$id LIMIT 4,1");

		if (count($record8) == 1 ) {
			$fc = mysqli_fetch_array($record8);
			$fc4name_of_children = $fc['name_of_children'];
            $fc4date_of_birth = $fc['date_of_birth'];
        }

        // family children 5
        $record9 = mysqli_query($db, "SELECT * FROM tbl_children WHERE employee_id=$id LIMIT 5,1");

		if (count($record9) == 1 ) {
			$fc = mysqli_fetch_array($record9);
			$fc5name_of_children = $fc['name_of_children'];
            $fc5date_of_birth = $fc['date_of_birth'];
        }

         // family children 6
        $record10 = mysqli_query($db, "SELECT * FROM tbl_children WHERE employee_id=$id LIMIT 6,1");

		if (count($record10) == 1 ) {
			$fc = mysqli_fetch_array($record10);
			$fc6name_of_children = $fc['name_of_children'];
            $fc6date_of_birth = $fc['date_of_birth'];
        }

         // family children 7
        $record11 = mysqli_query($db, "SELECT * FROM tbl_children WHERE employee_id=$id LIMIT 7,1");

		if (count($record11) == 1 ) {
			$fc = mysqli_fetch_array($record11);
			$fc7name_of_children = $fc['name_of_children'];
            $fc7date_of_birth = $fc['date_of_birth'];
        }

         // family children 8
        $record12 = mysqli_query($db, "SELECT * FROM tbl_children WHERE employee_id=$id LIMIT 8,1");

		if (count($record12) == 1 ) {
			$fc = mysqli_fetch_array($record12);
			$fc8name_of_children = $fc['name_of_children'];
            $fc8date_of_birth = $fc['date_of_birth'];
        }

         // family children 9
        $record13 = mysqli_query($db, "SELECT * FROM tbl_children WHERE employee_id=$id LIMIT 9,1");

		if (count($record13) == 1 ) {
			$fc = mysqli_fetch_array($record13);
			$fc9name_of_children = $fc['name_of_children'];
            $fc9date_of_birth = $fc['date_of_birth'];
        }

         // family children 10
        $record14 = mysqli_query($db, "SELECT * FROM tbl_children WHERE employee_id=$id LIMIT 10,1");

		if (count($record14) == 1 ) {
			$fc = mysqli_fetch_array($record14);
			$fc10name_of_children = $fc['name_of_children'];
            $fc10date_of_birth = $fc['date_of_birth'];
        }

         // family children 11
        $record15 = mysqli_query($db, "SELECT * FROM tbl_children WHERE employee_id=$id LIMIT 11,1");

		if (count($record15) == 1 ) {
			$fc = mysqli_fetch_array($record15);
			$fc11name_of_children = $fc['name_of_children'];
            $fc11date_of_birth = $fc['date_of_birth'];
        }

        // Special Skills 1
        $record16 = mysqli_query($db, "SELECT * FROM tbl_skills_hobbies WHERE employee_id=$id LIMIT 0,1");

		if (count($record16) == 1 ) {
			$sp = mysqli_fetch_array($record16);
			$sp1special_skills_hobbies = $sp['special_skills_hobbies'];
        }

        // Special Skills 2
        $record17 = mysqli_query($db, "SELECT * FROM tbl_skills_hobbies WHERE employee_id=$id LIMIT 1,1");

		if (count($record17) == 1 ) {
			$sp = mysqli_fetch_array($record17);
			$sp2special_skills_hobbies = $sp['special_skills_hobbies'];
        }

        // Special Skills 3
        $record18 = mysqli_query($db, "SELECT * FROM tbl_skills_hobbies WHERE employee_id=$id LIMIT 2,1");

		if (count($record18) == 1 ) {
			$sp = mysqli_fetch_array($record18);
			$sp3special_skills_hobbies = $sp['special_skills_hobbies'];
        }

        // Special Skills 4
        $record19 = mysqli_query($db, "SELECT * FROM tbl_skills_hobbies WHERE employee_id=$id LIMIT 3,1");

		if (count($record19) == 1 ) {
			$sp = mysqli_fetch_array($record19);
			$sp4special_skills_hobbies = $sp['special_skills_hobbies'];
        }

        // NON-ACADEMIC DISTINCTIONS / RECOGNITION  1
        $record20 = mysqli_query($db, "SELECT * FROM tbl_recog WHERE employee_id=$id LIMIT 0,1");

		if (count($record20) == 1 ) {
			$na = mysqli_fetch_array($record20);
			$na1non_academic_distinctions = $na['non_academic_distinctions'];
        }

         // NON-ACADEMIC DISTINCTIONS / RECOGNITION  2
        $record21 = mysqli_query($db, "SELECT * FROM tbl_recog WHERE employee_id=$id LIMIT 1,1");

		if (count($record21) == 1 ) {
			$na = mysqli_fetch_array($record21);
			$na2non_academic_distinctions = $na['non_academic_distinctions'];
        }

         // NON-ACADEMIC DISTINCTIONS / RECOGNITION  3
        $record22 = mysqli_query($db, "SELECT * FROM tbl_recog WHERE employee_id=$id LIMIT 2,1");

		if (count($record22) == 1 ) {
			$na = mysqli_fetch_array($record22);
			$na3non_academic_distinctions = $na['non_academic_distinctions'];
        }

         // NON-ACADEMIC DISTINCTIONS / RECOGNITION  4
        $record23 = mysqli_query($db, "SELECT * FROM tbl_recog WHERE employee_id=$id LIMIT 3,1");

		if (count($record23) == 1 ) {
			$na = mysqli_fetch_array($record23);
			$na4non_academic_distinctions = $na['non_academic_distinctions'];
        }

        // MEMBERSHIP IN ASSOCIATION/ORGANIZATION  1
        $record24 = mysqli_query($db, "SELECT * FROM tbl_membership WHERE employee_id=$id LIMIT 0,1");

		if (count($record24) == 1 ) {
			$ma = mysqli_fetch_array($record24);
			$ma1membership_asso_organization = $ma['membership_asso_organization'];
        }

        // MEMBERSHIP IN ASSOCIATION/ORGANIZATION  2
        $record25 = mysqli_query($db, "SELECT * FROM tbl_membership WHERE employee_id=$id LIMIT 1,1");

		if (count($record25) == 1 ) {
			$ma = mysqli_fetch_array($record25);
			$ma2membership_asso_organization = $ma['membership_asso_organization'];
        }

         // MEMBERSHIP IN ASSOCIATION/ORGANIZATION  3
        $record26 = mysqli_query($db, "SELECT * FROM tbl_membership WHERE employee_id=$id LIMIT 2,1");

		if (count($record26) == 1 ) {
			$ma = mysqli_fetch_array($record26);
			$ma3membership_asso_organization = $ma['membership_asso_organization'];
        }

         // MEMBERSHIP IN ASSOCIATION/ORGANIZATION  4
        $record27 = mysqli_query($db, "SELECT * FROM tbl_membership WHERE employee_id=$id LIMIT 3,1");

		if (count($record27) == 1 ) {
			$ma = mysqli_fetch_array($record27);
			$ma4membership_asso_organization = $ma['membership_asso_organization'];
        }

         // tbl_additional_info
        $record28 = mysqli_query($db, "SELECT * FROM tbl_additional_info WHERE employee_id=$id");

		if (count($record28) == 1 ) {
			$qa = mysqli_fetch_array($record28);
            $question_34_a = $qa['question_34_a'];
            $question_34_b = $qa['question_34_b'];
            $yes_details_34_b = $qa['yes_details_34_b'];
            $question_35_a = $qa['question_35_a'];
            $yes_details_35_a = $qa['yes_details_35_a'];
            $question_35_b = $qa['question_35_b'];
            $question_35_b_datefiled = $qa['question_35_b_datefiled'];
            $status_cases_35_b = $qa['status_cases_35_b'];
            $question_36 = $qa['question_36'];
            $yes_details_36 = $qa['yes_details_36'];
            $question_37 = $qa['question_37'];
            $yes_details_37 = $qa['yes_details_37'];
            $question_38_a = $qa['question_38_a'];
            $yes_details_38_a = $qa['yes_details_38_a'];
            $question_38_b = $qa['question_38_b'];
            $yes_details_38_b = $qa['yes_details_38_b'];
            $question_39 = $qa['question_39'];
            $yes_details_39 = $qa['yes_details_39'];
            $question_40_a = $qa['question_40_a'];
            $a_yes_details_40 = $qa['a_yes_details_40'];
            $question_40_b = $qa['question_40_b'];
            $b_yes_details_b = $qa['b_yes_details_b'];
            $question_40_c = $qa['question_40_c'];
            $c_yes_details_c = $qa['c_yes_details_c'];
        }

        if ($question_34_a === 'YES'){
            $question_34_ay = 'checked';
            $question_34_an = 'no';
        } else {
            $question_34_ay = 'no';
            $question_34_an = 'checked';
        }
        if ( $question_34_b ==='YES'){
            $question_34_by = 'checked';
            $question_34_bn = 'no';
        }else{
            $question_34_by = 'no';
            $question_34_bn = 'checked';
        }
        if ( $question_35_a ==='YES' ){
            $question_35_ay = 'checked';
            $question_35_an = 'no';
        }else{
            $question_35_ay = 'no';
            $question_35_an = 'checked';
        }
        if ($question_35_b ==='YES' ){
            $question_35_by = 'checked';
            $question_35_bn = 'no';
        }else{
            $question_35_by = 'no';
            $question_35_bn = 'checked';
        }
        if ( $question_36 ==='YES'){
            $question_36y = 'checked';
            $question_36n = 'no';
        }else{
            $question_36y = 'no';
            $question_36n = 'checked';
        }
        if ( $question_37 ==='YES'){
            $question_37y = 'checked';
            $question_37n = 'no';
        }else{
            $question_37y = 'no';
            $question_37n = 'checked';
        }
        if ($question_38_a ==='YES'){
            $question_38_ay = 'checked';
            $question_38_an = 'no';
        }else{
            $question_38_ay = 'no';
            $question_38_an = 'checked';
        }
        if ($question_38_b ==='YES'){
            $question_38_by = 'checked';
            $question_38_bn = 'no';
        }else{
            $question_38_by = 'no';
            $question_38_bn = 'checked';
        }
        if ($question_39 ==='YES'){
            $question_39y = 'checked';
            $question_39n = 'no';
        }else{
            $question_39y = 'no';
            $question_39n = 'checked';
        }
        if ( $question_40_a ==='YES'){
            $question_40_ay = 'checked';
            $question_40_an = 'no';
        }else{
            $question_40_ay = 'no';
            $question_40_an = 'checked';
        }
        if ($question_40_b ==='YES'){
            $question_40_by = 'checked';
            $question_40_bn = 'no';
        }else{
            $question_40_by = 'no';
            $question_40_bn = 'checked';
        }
        if ($question_40_c ==='YES'){
            $question_40_cy = 'checked';
            $question_40_cn = 'no';
        } else {
            $question_40_cy = 'no';
            $question_40_cn = 'checked';
        }

         // tbl_gov_id
        $record29 = mysqli_query($db, "SELECT * FROM tbl_gov_id WHERE employee_id=$id");

		if (count($record29) == 1 ) {
			$g = mysqli_fetch_array($record29);
            $ggov_id = $g['gov_id'];
            $gid_no = $g['id_no'];
            $gdate_place_issuance = $g['date_place_issuance'];
        }

	}
?>


<style type="text/css">
table#t01{
width: 950px;
border: 1px solid black;
border-collapse: collapse;
font-size: 13px;

}

th, td {
border: 1px solid black;
border-collapse: collapse;
padding: 2px;

</style>

<html>
<head> </head>
<body>

<table id="t01">
	<tr>
		<td colspan="12"><i><b>CS Form No. 212</b></i></td>
    </tr>
	<tr>
        <td colspan="12" style="max-height: 12px;">
			<i><b>Revised 2017</b></i>
		</td>
    </tr>
	<tr>
		<td colspan="12">
			<font size="4"><b>PERSONAL DATA SHEET </b></font>
        </td>
    </tr>
	<tr>
        <td colspan="12"><i><b>WARNING: Any misrepresentation main in the Personal Data Sheet and the
                                    Work Experience Sheet shall cause the filing of administative/criminal case/s
        against the person concerned.</b></i></td>
    </tr>
	<tr>
        <td colspan="12"><i><b>WARNING: Any misrepresentation main in the Personal Data Sheet and the
                                    Work Experience Sheet shall cause the filing of administative/criminal case/s
                                    against the person concerned.</b></i></td>
    </tr>
	<tr>
                        <td colspan="12"><i><b>READ THE ATTACHED GUIDE TO FILLING OUT THE PERSONAL DATA SHEET (PDS)
                                    BEFORE ACCOMPLISHING THE PDS FORM</b></i></td>
    </tr>
	 <tr>
                        <td colspan="9">Print legibly. Tick appropriate boxes ( <input type="checkbox" checked> ) ad use
                            seperate sheet if necessary. Indicate N/A if not applicable. <b>DO NOT ABBREVIATE.</b></td>
                        <td colspan="1" style="border:1px solid#000b;background:#757575;width:8%;"><small>1. CS ID
                                No.</small></td>
                        <td colspan="2" class="text-right" style="border:1px solid #000;width:20%;"><small>(Do not fill
                                up. For CSC use only)</small></td>
    </tr>
	<tr>
                        <td colspan="12" class="text-white separator">I. PERSONAL INFORMATION</td>
    </tr>
	<tr>
                        <td colspan="1" class="s-label border-bottom-0">
                            <span class="count">2.</span> SURNAME
                        </td>
                        <td colspan="11"> <b><?php echo $surname; ?></b></td>
    </tr>
	<tr>
                        <td colspan="1" class="s-label border-0"><span class="count"></span> FIRST NAME</td>
                        <td colspan="9"><b><?php echo $first_name; ?></b></td>
                        <td colspan="2" class="align-top"><small>NAME EXTENSION (JR.,SR)
                            </small><b><?php echo $name_extension; ?></b>
                        </td>
    </tr>
	<tr>
                        <td colspan="1" class="s-label border-0"><span class="count"></span> MIDDLE NAME</td>
                        <td colspan="11"><b><?php echo $middle_name; ?></b></td>
    </tr>
	<tr>
                        <td colspan="1" class="s-label border-bottom-0">
                            <span class="count">3.</span> DATE OF BIRTH<br>
                            <span class="count"></span> (mm/dd/yyyy)
                        </td>
                        <td colspan="5"><b><?php echo $date_birth; ?></b></td>
                        <td colspan="3" class="s-label align-top border-bottom-0">
                            <span class="count">16.</span> CITIZENSHIP
                        </td>

                        <td colspan="3" style="border-bottom: 0;">
                            <div class="d-flex justify-content-between align-items-center ml-2 mt-2 mb-0 mr-2">
                                <div class="form-group mb-0">
                                    <input type="checkbox" <?php echo $citizenshipy; ?> disabled>
                                    <label for="my-input">Filipino</label>
                                </div>
                                <div class="form-group mb-0">
                                    <input type="checkbox" <?php echo $citizenshipn; ?> disabled>
                                    <label for="my-input">Dual Citizenship</label>
                                </div>
                            </div>
                        </td>
    </tr>
	<tr>
                        <td colspan="1" class="s-label border-0"></td>
                        <td colspan="5" style=""></td>
                        <td colspan="3" class="s-label align-top border-0 text-center small">
                            If holder of dual citizenship,
                        </td>
                        <td colspan="3">
                            <div class="d-flex justify-content-between align-items-center ml-2 mt-2 mb-0 mr-2">
                                <div class="form-group mb-0">
                                    <input type="checkbox" <?php echo $dual_citizenshipy; ?> disabled>
                                    <label for="my-input">by birth</label>
                                </div>
                                <div class="form-group mb-0">
                                    <input type="checkbox" <?php echo $dual_citizenshipn; ?> disabled>
                                    <label for="my-input">by naturalization</label>
                                </div>
                            </div>
                            <label for="my-input">Pls. indicate country:</label>
                        </td>
    </tr>
	<tr>
                        <td colspan="1" class="s-label"><span class="count">4.</span> PLACE OR BIRTH</td>
                        <td colspan="5"><b><?php echo $place_of_birth; ?></b></td>
                        <td colspan="3" class="s-label align-top border-0 text-center small"> please indicate the
                            details.</td>
                        <td colspan="3" style="border-bottom: none;"><b><?php echo $country; ?></b></td>
    </tr>
	<tr>
                        <td colspan="1" class="s-label"><span class="count">5.</span> SEX</td>
                        <td colspan="5">
                            <div class="d-flex justify-content-between align-items-center ml-2 mt-2 mb-0 mr-2">
                                <div class="form-group mb-0">
                                    <input type="checkbox" <?php echo $sexy; ?> disabled>
                                    <label for="my-input">Male</label>
                                </div>
                                <div class="form-group mb-0">
                                    <input type="checkbox" <?php echo $sexn; ?> disabled>
                                    <label for="my-input">Female</label>
                                </div>
                            </div>
                        </td>
                        <td colspan="3" class="s-label align-top border-0"></td>
                        <td colspan="3" style="border-top: none;"></td>
    </tr>
	<tr>
                        <td colspan="1" rowspan="2" class="s-label border-bottom-0"><span class="count">6.</span> CIVIL STATUS</td>
                        <td colspan="5" rowspan="2" style="border-top: none !important;">
                            <div class="d-flex justify-content-between align-items-center ml-2 mt-2 mb-0 mr-2">
                                <div class="form-group mb-0">
                                    <input type="checkbox" <?php echo $civil_statuss; ?> disabled>
                                    <label for="my-input">Single</label>
                                </div>
                                <div class="form-group mb-0">
                                    <input type="checkbox" <?php echo $civil_statusm; ?> disabled>
                                    <label for="my-input">Married</label>
                                </div>
                                <div class="form-group mb-0">
                                    <input type="checkbox" <?php echo $civil_statusw; ?> disabled>
                                    <label for="my-input">Widowed</label>
                                </div>
								<div class="form-group mb-0">
                                    <input type="checkbox" <?php echo $civil_statusse; ?> disabled>
                                    <label for="my-input">Separated</label>
                                </div>
                                <div class="form-group mb-0">
                                    <input type="checkbox" <?php echo $civil_statuso; ?> disabled>
                                    <label for="my-input">Other/s</label>
                                </div>
                            </div>
                        </td>
                        <td colspan="2" rowspan="2" class="s-label align-top border-bottom-0 small">
                            <span class="count">17.</span> RESIDENTIAL ADDRESS
                        </td>
                        <td colspan="2"><b><?php echo $residential_house_block_lot_no; ?></b></td>
                        <td colspan="2"><b><?php echo $residential_street; ?></b></td>
    </tr>
	<tr>
                        
                       
                      
                        <td colspan="3"><b><?php echo $residential_subdivision_village; ?></b></td>
                        <td colspan="2"><b><?php echo $residential_barangay; ?></b></td>
    </tr>
	<tr>
                        <td colspan="1" class="s-label"><span class="count">7.</span> HEIGHT (m)</td>
                        <td colspan="5"><b><?php echo $height_m; ?></b></td>
                        <td colspan="2" class="s-label align-top border-0"></td>
                        <td colspan="2"><b><?php echo $residential_city_municipality; ?></b></td>
                        <td colspan="2"><b><?php echo $residential_province; ?></b></td>
    </tr>
	<tr>
                        <td colspan="1" class="s-label"><span class="count">8.</span> WEIGHT (kg)</td>
                        <td colspan="5"><b><?php echo $weight_m; ?></b></td>
                        <td colspan="2" class="s-label border-0 text-center">
                            ZIP CODE
                        </td>
                        <td colspan="4"><b><?php echo $residential_zipcode; ?></b></td>
    </tr>
					<tr>
                        <td colspan="1" class="s-label"><span class="count">9.</span> BLOOD TYPE</td>
                        <td colspan="5"><b><?php echo $blood_type; ?></b></td>
                        <td colspan="2" class="s-label border-bottom-0"><span class="count">18.</span> PERMANENT ADDRESS
                        </td>
                        <td colspan="2"><b><?php echo $permanent_house_block_lot_no; ?></b></td>
                        <td colspan="2"><b><?php echo $permanent_street; ?></b></td>
                    </tr>
                    <tr>
                        <td colspan="1" class="s-label"><span class="count">10.</span> GSIS ID NO.</td>
                        <td colspan="5"><b><?php echo $gsis_id_no ; ?></b></td>
                        <td colspan="2" class="s-label border-0"></td>
                        <td colspan="2"><b><?php echo $permanent_subdivision_village; ?></b></td>
                        <td colspan="2"><b><?php echo $permanent_barangay; ?></b></td>
                    </tr>
                    <tr>
                        <td colspan="1" class="s-label"><span class="count">11.</span> PAG-IBIG NO.</td>
                        <td colspan="5"><b><?php echo $pagibig_id_no ; ?></b></td>
                        <td colspan="2" class="s-label border-0"></td>
                        <td colspan="2"><b><?php echo $permanent_city_municipality; ?></b></td>
                        <td colspan="2"><b><?php echo $permanent_province; ?></b></td>
                    </tr>
                    <tr>
                        <td colspan="1" class="s-label"><span class="count">12.</span> PHILHEALTH NO.</td>
                        <td colspan="5"><b><?php echo $philhealth_no ; ?></b></td>
                        <td colspan="2" class="s-label text-center border-0">ZIP CODE</td>
                        <td colspan="4"><b><?php echo $permanent_zipcode; ?></b></td>
                    </tr>
                    <tr>
                        <td colspan="1" class="s-label"><span class="count">13.</span> SSS NO.</td>
                        <td colspan="5"><b><?php echo $sss_no ; ?></b></td>
                        <td colspan="2" class="s-label"><span class="count">19.</span> TELEPHONE NO.</td>
                        <td colspan="4"><b><?php echo $telephone_no; ?></b></td>
                    </tr>
                    <tr>
                        <td colspan="1" class="s-label"><span class="count">14.</span> TIN NO.</td>
                        <td colspan="5"><b><?php echo $tin_no ; ?></b></td>
                        <td colspan="2" class="s-label"><span class="count">20.</span> MOBILE NO.</td>
                        <td colspan="4"><b><?php echo $mobile_no; ?></b></td>
                    </tr>
                    <tr>
                        <td colspan="1" class="s-label"><span class="count">15.</span> AGENCY EMPLOYEE NO.</td>
                        <td colspan="5"><b><?php echo $agency_employee_no ; ?></b></td>
                        <td colspan="2" class="s-label"><span class="count">21.</span> EMAIL ADDRESS (if any)</td>
                        <td colspan="4"><b><?php echo $email_address; ?></b>
                        </td>
                    </tr>
					<tr>
                        <td colspan="12" class="text-white separator">II. FAMILY BACKGROUND</td>
                    </tr>
                    <tr>
                        <td colspan="1" class="s-label border-bottom-0">
                            <span class="count">22.</span> SPOUSE SURNAME
                        </td>
                        <td colspan="5"><b><?php echo $spouses_surname; ?></b></td>
                        <td colspan="3" class="s-label">
                            <span class="count">23.</span> NAME of CHILDREN (Write full name and list all)
                        </td>
                        <td colspan="3" class="s-label text-center" style="width: 18%;">DATE OF BIRTH (mm/dd/yyyy)</td>
                    </tr>
                    <tr>
                        <td colspan="1" class="s-label border-0">
                            <span class="count"></span> FIRST NAME
                        </td>
                        <td colspan="4"><b><?php echo $sfirst_name; ?></b></td>
                        <td colspan="1" class="align-top s-label">
                            <small>
                                NAME EXTENSION (JR.,SR)
                            </small>
                            <b><?php echo $sname_extension; ?></b>
                        </td>
                        <td colspan="3"><b><?php echo $fcname_of_children; ?></b></td>
                        <td colspan="3"><b><?php echo $fcdate_of_birth; ?></b></td>
                    </tr>
					<tr>
                        <td colspan="1" class="s-label border-0">
                            <span class="count"></span> MIDDLE NAME
                        </td>
                        <td colspan="5"><b><?php echo $smiddle_name; ?></b></td>
                        <td colspan="3"><b><?php echo $fc1name_of_children; ?></b></td>
                        <td colspan="3"><b><?php echo $fc1date_of_birth; ?></b></td>
                    </tr>
                    <tr>
                        <td colspan="1" class="s-label">
                            <span class="count"></span> OCCUPATION
                        </td>
                        <td colspan="5"><b><?php echo $soccupation; ?></b></td>
                        <td colspan="3"><b><?php echo $fc2name_of_children; ?></b></td>
                        <td colspan="3"><b><?php echo $fc2date_of_birth; ?></b></td>
                    </tr>
					<tr>
                        <td colspan="1" class="s-label">
                            <span class="count"></span> EMPLOYER/BUSINESS NAME
                        </td>
                        <td colspan="5"><b><?php echo $semployer_business_name; ?></b></td>
                        <td colspan="3"><b><?php echo $fc3name_of_children; ?></b></td>
                        <td colspan="3"><b><?php echo $fc3date_of_birth; ?></b></td>
                    </tr>
                    <tr>
                        <td colspan="1" class="s-label">
                            <span class="count"></span> BUSINESS ADDRESS
                        </td>
                        <td colspan="5"><b><?php echo $sbusiness_address; ?></b></td>
                        <td colspan="3"><b><?php echo $fc4name_of_children; ?></b></td>
                        <td colspan="3"><b><?php echo $fc4date_of_birth; ?></b></td>
                    </tr>
					<tr>
                        <td colspan="1" class="s-label">
                            <span class="count"></span> TELEPHONE NO.
                        </td>
                        <td colspan="5"><b><?php echo $stelephone_no; ?></b></td>
                        <td colspan="3"><b><?php echo $fc5name_of_children; ?></b></td>
                        <td colspan="3"><b><?php echo $fc5date_of_birth; ?></b></td>
                    </tr>
					<tr>
                        <td colspan="1" class="s-label border-bottom-0">
                            <span class="count">24.</span> FATHER'S SURNAME
                        </td>
                        <td colspan="5"><b><?php echo $fsurname; ?></b></td>
                        <td colspan="3"><b><?php echo $fc6name_of_children; ?></b></td>
                        <td colspan="3"><b><?php echo $fc6date_of_birth; ?></b></td>
                    </tr>
                    <tr>
                        <td colspan="1" class="s-label border-0">
                            <span class="count"></span> FIRST NAME
                        </td>
                        <td colspan="4"><b><?php echo $ffirst_name; ?></b></td>
                        <td colspan="1" class="align-top s-label">
                            <small>
                                NAME EXTENSION (JR.,SR)
                            </small>
                            <b><?php echo $fname_extension; ?></b>
                        </td>
                        <td colspan="3"><b><?php echo $fc7name_of_children; ?></b></td>
                        <td colspan="3"><b><?php echo $fc7date_of_birth; ?></b></td>
                    </tr>
					<tr>
                        <td colspan="1" class="s-label border-0">
                            <span class="count"></span> MIDDLE NAME
                        </td>
                        <td colspan="5"><b><?php echo $fmiddle_name; ?></b></td>
                        <td colspan="3"><b><?php echo $fc8name_of_children; ?></b></td>
                        <td colspan="3"><b><?php echo $fc8date_of_birth; ?></b></td>
                    </tr>
                    <tr>
                        <td colspan="1" class="s-label border-bottom-0">
                            <span class="count">25.</span> MOTHERS MAIDEN NAME
                        </td>
                        <td colspan="5"><b><?php echo $fmmaidenname; ?></b></td>
                        <td colspan="3"><b><?php echo $fc9name_of_children; ?></b></td>
                        <td colspan="3"><b><?php echo $fc9date_of_birth; ?></b></td>
                    </tr>
					<tr>
                        <td colspan="1" class="s-label border-0">
                            <span class="count"></span> SURNAME
                        </td>
                        <td colspan="5"><b><?php echo $fmsurname; ?></b></td>
                        <td colspan="3"><b><?php echo $fc10name_of_children; ?></b></td>
                        <td colspan="3"><b><?php echo $fc10date_of_birth; ?></b></td>
                    </tr>
                    <tr>
                        <td colspan="1" class="s-label border-0">
                            <span class="count"></span> FIRST NAME
                        </td>
                        <td colspan="5"><b><?php echo $fmfirst_name; ?></b></td>
                        <td colspan="3"><b><?php echo $fc11name_of_children; ?></b></td>
                        <td colspan="3"><b><?php echo $fc11date_of_birth; ?></b></td>
                    </tr>
					<tr>
                        <td colspan="1" class="s-label border-0">
                            <span class="count"></span> MIDDLE NAME
                        </td>
                        <td colspan="5"><b><?php echo $fmmiddle_name; ?></b></td>
                        <td colspan="6" class="s-label text-danger text-center"><i><b>(Continue on seperate sheet if
                                    necessary)</b></i></td>
                    </tr>
					<tr>
                        <td colspan="12" class="text-white separator">III. EDUCATIONAL BACKGROUND</td>
                    </tr>
                    <tr class="text-center">
                        <td colspan="1" class="s-label border-bottom-0">
                            <span class="count">26.</span>
                            <span class="d-block text-center">LEVEL</span>
                        </td>
                        <td colspan="4" class="s-label border-bottom-0">
                            NAME OF SCHOOL<br>(Write in full)
                        </td>
                        <td colspan="2" >
                            BASIC EDUCATION/DEGREE/COURSE<br>
                            (Write in full)
                        </td>
                        <td colspan="1" class="s-label border-bottom-0">
                            PERIOD OF ATTENDANCE
                        </td>
                        <td colspan="2" class="s-label border-bottom-0"> HIGHEST LEVEL / UNITS EARNED<br>(If not graduated)
                        </td>
                        <td colspan="1" class="s-label border-bottom-0">YEAR GRADUATED</td>
                        <td colspan="1" class="s-label border-bottom-0">SCHOLARSHIP/<br>ACADEMIC<br>HONORS<br>RECEIVED
                        </td>
                    </tr>
					<tr class="text-center" style="margin-top: -20px;">
                        <td colspan="1" class="s-label border-top-0"></td>
                        <td colspan="4" class="s-label border-top-0"></td>
                        <td colspan="2" class="s-label border-top-0"></td>
                        <td colspan="1" class="s-label">From</td>
                        <td colspan="1" class="s-label">To</td>
                        <td colspan="1" class="s-label border-top-0"></td>
                        <td colspan="1" class="s-label border-top-0"></td>
                        <td colspan="1" class="s-label border-top-0"></td>
                    </tr>
					<?php
						require('db_config.php');
						$id = $_GET['print'];
						
						$sql = "SELECT * FROM tbl_educ WHERE employee_id=$id  ORDER BY educational_id";
						$educs = $mysqli->query($sql);
						while($educ = $educs->fetch_assoc()){
					?>
                    <tr>
                        <td colspan="1" class="s-label" style="text-transform: uppercase;">
                            <span class="count"></span> <?php echo $educ['ed_level'] ?>
                        </td>
                        <td colspan="4"><b><?php echo $educ['name_of_school'] ?></b></td>
                        <td colspan="2"><b><?php echo $educ['educ_degree'] ?></b></td>
                        <td colspan="1"><b><?php echo $educ['att_from'] ?></b></td>
                        <td colspan="1"><b><?php echo $educ['att_to'] ?></b></td>
                        <td colspan="1"><b><?php echo $educ['level_earned'] ?></b></td>
                        <td colspan="1"><b><?php echo $educ['year_grad'] ?></b></td>
                        <td colspan="1"><b><?php echo $educ['scholarship_honors'] ?></b></td>
                    </tr>
                    <?php } ?>
					<tr>
                        <td colspan="12" class="text-white separator bg-transparent text-danger text-center">
                            <i>(Continue on seperate sheet if necessary)</i>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="1" class="text-center"><i><b>SIGNATURE</b></i></td>
                        <td colspan="6"></td>
                        <td colspan="2" class="text-center"><i><b>DATE</b></i></td>
                        <td colspan="3"></td>
                    </tr>
					 <!-- End of Page 1 -->
</table>

        
</div>

</body>

</html>

<script type="text/javascript">
function PrintElement(elem) {
    var divName = "main-tbl";
    var printContents = document.getElementById(divName).innerHTML;
    var originalContents = document.body.innerHTML;
    document.body.innerHTML = printContents;
    window.print();
    document.body.innerHTML = originalContents;
}

function PrintElement1(elem) {
    var divName = "c1";
    var printContents = document.getElementById(divName).innerHTML;
    var originalContents = document.body.innerHTML;
    document.body.innerHTML = printContents;
    window.print();
    document.body.innerHTML = originalContents;
}

function PrintElement2(elem) {
    var divName = "c2";
    var printContents = document.getElementById(divName).innerHTML;
    var originalContents = document.body.innerHTML;
    document.body.innerHTML = printContents;
    window.print();
    document.body.innerHTML = originalContents;
}

function PrintElement3(elem) {
    var divName = "c3";
    var printContents = document.getElementById(divName).innerHTML;
    var originalContents = document.body.innerHTML;
    document.body.innerHTML = printContents;
    window.print();
    document.body.innerHTML = originalContents;
}

function PrintElement4(elem) {
    var divName = "c4";
    var printContents = document.getElementById(divName).innerHTML;
    var originalContents = document.body.innerHTML;
    document.body.innerHTML = printContents;
    window.print();
    document.body.innerHTML = originalContents;
}
</script>

  <script type="text/javascript">
        
    function codespeedy(){
      var print_div = document.getElementById("pds_print");
var print_area = window.open();
print_area.document.write(print_div.innerHTML);
print_area.document.close();
print_area.focus();
print_area.print();
print_area.close();
// This is the code print a particular div element
    }
  </script>



Categories
C

Minimum and Maximum Number in an Array in C

This program is being written by my good friend and fellow software engineer Sir Ernel G. Fadriquilan thank you very much, Sir, for sharing your code to us.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, IT projects, school and application development, programming projects, thesis, and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.

https://www.mindshaperspublishing.com/
https://www.unlimitedbooksph.com/

Program Listing

#include <stdio.h>

int main(){
int i,n,val,min,max=0;
printf("Enter how many numbers you want to enter:");
scanf("%d",&amp;n);
printf("Enter the %d numbers:\n",n);
scanf("%d",&amp;val);
min=val;
if(val>=max)
max=val;
for(i=1;i<n;i++)
{
scanf("%d",&amp;val);
if(val>max)
max=val;
if(val<min)
min=val;
}
printf("\nThe maximum of given %d numbers is: %d",n,max);
printf("\n");
printf("\nThe minimum of given %d numbers is: %d",n,min);
return 0;
}