Tuesday, April 30, 2019

Display All The Records From MySQL Using JQuery and PHP

A program that I wrote using PHP as my server language, MySQL as my backend database and JQuery for my frontend to retrieve all the records in the database.

I am currently accepting programming work, 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 I also accepting computer repair, networking and Arduino Project development at a very affordable price.

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



Sample Program Output


Program Listing

index.php

<html>  
    <head>  
        <title>Display All The Record From MySQL Using JQuery</title>  
<link rel="stylesheet" href="bootstrap.min.css" />
<script src="jquery-3.4.0.min.js"></script>  
    </head>  
    <body>  
        <div class="container">
<br />
<h3 align="center">Display All The Records From MySQL Using JQuery</a></h3><br />
<br />
<div class="table-responsive" id="show_records">
</div>
</div>
<script type="text/javascript">
/* Written By Mr. Jake R. Pomperada,MAED-IT
   April 30, 2019  Tuesday    
   Bacolod City, Negros Occidental  */
load_data();
    
function load_data()
{
$.ajax({
url:"fetch.php",
method:"POST",
success:function(data)
{
$('#show_records').html(data);
}
});
}

</script>
</body>
</html>

fetch.php

<?php

//fetch.php
/* Written By Mr. Jake R. Pomperada,MAED-IT
   April 30, 2019  Tuesday    
   Bacolod City, Negros Occidental  */

include("database_connection.php");
$query = "SELECT * FROM tbl_students";
$statement = $connect->prepare($query);
$statement->execute();
$result = $statement->fetchAll();
$total_row = $statement->rowCount();
$output = '
<table class="table table-striped table-bordered">
<tr>
<th>First Name</th>
<th>Last Name</th>
<th>Course</th>
</tr>
';
if($total_row > 0)
{
foreach($result as $row)
{
$output .= '
<tr>
<td width="10%">'.$row["first_name"].'</td>
<td width="10%">'.$row["last_name"].'</td>
<td width="15%">'.$row["course"].'</td>
</tr>
';
}
}
else
{
$output .= '
<tr>
<td colspan="5" align="center">Data not found</td>
</tr>
';
}
$output .= '</table>';
echo $output;
?>

tbl_students.sql

-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 30, 2019 at 08:49 AM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.1.28

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
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 utf8mb4 */;

--
-- Database: `students`
--

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

--
-- Table structure for table `tbl_students`
--

CREATE TABLE `tbl_students` (
  `id` int(11) NOT NULL,
  `first_name` varchar(200) NOT NULL,
  `last_name` varchar(200) NOT NULL,
  `course` varchar(300) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tbl_students`
--

INSERT INTO `tbl_students` (`id`, `first_name`, `last_name`, `course`) VALUES
(3, 'Jake', 'Pomperada', 'Bachelor of Science in Computer Science'),
(4, 'Ma. Junallie', 'Pomperada', 'Bachelor of Science in Chemical Engineering'),
(5, 'Jacob Samuel', 'Pomperada', 'Bachelor of Science in Business Management'),
(6, 'Julianna Rae', 'Pomperada', 'Bachelor of Science in Accountancy'),
(7, 'Lydia', 'Pomperada', 'Bachelor of Science in Social Studies'),
(8, 'Virgilio', 'Pomperada', 'Bachelor of Science in Agriculture'),
(9, 'Leslie Vinky', 'Pomperada', 'Bachelor of Science in Electronics Engineering'),
(11, 'Kobe', 'Bryant', 'Master in Information Technology');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `tbl_students`
--
ALTER TABLE `tbl_students`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `tbl_students`
--
ALTER TABLE `tbl_students`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;
COMMIT;

/*!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 */;





CRUD using PHP,Ajax,MySQL using JQuery UI Dialog

A student information system that I wrote using PHP, Ajax, MySQL using JQuery UI Dialog box that uses CRUD file management.

I am currently accepting programming work, 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 I also accepting computer repair, networking and Arduino Project development at a very affordable price.

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






Sample Program Output










Monday, April 29, 2019

Addition and Product of Numbers in JQuery

A simple program that I wrote using JQuery to ask the user two number and then the program will compute the sum and product of the two numbers and display the result on the screen.

I am currently accepting programming work, 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 I also accepting computer repair, networking and Arduino Project development at a very affordable price.

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



Sample Program Output


Program Listing

sum_product.html

<html>
<head>
<title>Addition and Product of Numbers</title>
<script src="jquery-3.4.0.min.js"></script>
<style>
body {
 background-color:white;
 font-family: arial;
 font-size:15px;
 font-weight:bold;
 }

 .input_bold {
    font-weight: bold;
 font-size:15px;
 color:blue;
}

.input_bold2 {
    font-weight: bold;
 font-size:15px;
 color:black;
 }

.left {
    width: 15%;
    float: left;
    text-align: right;
}
.right {
    width: 50%;
    margin-left: 10px;
    float:left;
}

.header {
    width: 30%;
    float: left;
    text-align: right;
}

h4 {
text-align: center;
}
</style> 
<script>
    /* solve button */
$(document).ready(function() {
    //this calculates values automatically 
    sum();
    $("#solve").click(function() {
        sum();
    });

/* clear button */
    $("#clear").click(function(){
    $("#num1").val('');
    $("#num2").val('');
    $("#sum").val('');
    $("#subt").val('');
    $("#num1").focus();
   });

});

function sum() {
            var num1 = document.getElementById('num1').value;
            var num2 = document.getElementById('num2').value;
var result = parseInt(num1) + parseInt(num2);
var result1 = parseInt(num2) * parseInt(num1);
            if (!isNaN(result)) {
                document.getElementById('sum').value = result;
document.getElementById('subt').value = result1;
            }
        }
   
   </script>
</head>
<body>
<form>
<br><br>
<div class="header">
<h3>Addition and Product of Numbers</h3>
</div>
<br><br><br><br>
<div class="left">
Give a value No. 1
</div>
<div class="right">
 <input type="text" id="num1"  name="num1"  class="input_bold2 "size="10" autofocus/><br>
</div>
<br><br>
<div class="left">
Give a value No. 2
</div>
<div class="right">
 <input type="text" id="num2" name="num2"  class="input_bold2" size="10" /><br>
</div>
<br><br>
<div class="left">
 The total sum is
</div> 
<div class="right">
 <input type="text" id="sum" name="sum"  class="input_bold" size="10" readonly />
</div> 
<br><br>
<div class="left">
 The product is
</div>
<div class="right">
 <input type="text" id="subt" name="subt" class="input_bold" size="10" readonly/><br>
</div>
 <br><br><br>
 <div class="left">
<button type= "button" id ="solve">Solve</button>    
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</div>
<div class="right">
<button type= "button" id ="clear">Clear </button> 
<br>
</div>
</form>
</body>
</html>


Fahrenheit To Celsius Converter in JQuery

A simple program that I wrote using JQuery to ask the user to give temperature in Fahrenheit and convert it into Celsius temperature equivalent.

I am currently accepting programming work, 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 I also accepting computer repair, networking and Arduino Project development at a very affordable price.

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



Sample Program Output

Program Listing

temperature.html

<html>
<head>
<title>Fahrenheit To Celsius Converter</title>
<script src="jquery-3.4.0.min.js"></script>
<style>
body {
 background-color:white;
 font-family: arial;
 font-size:15px;
 font-weight:bold;
 }

 .input_bold {
    font-weight: bold;
 font-size:15px;
 color:blue;
}

.input_bold2 {
    font-weight: bold;
 font-size:15px;
 color:black;
 }

.left {
    width: 15%;
    float: left;
    text-align: right;
    
}
.right {
    width: 50%;
    margin-left: 20px;
    float:left;
}

.header {
    width: 30%;
    float: left;
    text-align: right;
}

h4 {
text-align: center;
}
</style> 
<script>
    /* solve button */
$(document).ready(function() {
 
    $("#fahrenheit").on("keydown keyup", function() {
     //$("#solve").click(function() {
       var fah = $("#fahrenheit").val();
       celsius = (fah-32) * 5 / 9; 
       $("#results").val(celsius.toFixed(2) +" "+ String.fromCharCode(176) + "C");
     });

     
/* clear button */
    $("#clear").click(function(){
    $("#fahrenheit").val('');
    $("#results").val('');
    $("#fahrenheit").focus();
   });

});
 
   </script>
</head>
<body>
<form>
<br>
<div class="header">
<h3>Fahrenheit To Celsius Converter</h3>
</div>
<br><br><br><br><br>
<div class="left">
 Temperature in Fahrenheit 
</div>
<div class="right">
 <input type="text" id="fahrenheit"  name="fahrenheit"  class="input_bold2 "size="10" autofocus/><br>
</div>
<br><br>
<div class="left">
Celsius  Equivalent
</div> 
<div class="right">
 <input type="text" id="results" name="results"  class="input_bold" size="10" readonly />
</div> 
<br><br>
<div class="right">
<button type= "button" id ="clear" title="Click here to clear the textbox.">
Clear </button> 
<br>
</div>
</form>
</body>
</html>

Tuesday, April 23, 2019

Math Converter in Python

 A menu driven program that has the follow mathematics conversion
area of the triangle, height in centimeter to feet and inches, find lcm of two numbers, sum of first n natural numbers and calculate the simple interest and display the result on the screen using Python programming language.

I am currently accepting programming work, 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 I also accepting computer repair, networking and Arduino Project development at a very affordable price.

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


Program Listing

# Rollyn M. Moises and Jake R. Pomperada
# calculator.py
# February 6, 2019  Wednesday
# Bacolod City, Negros Occidental

import math
print();
print("\tMATH CONVERTERS");
print();
print("\t[1] Area of the Triangle");
print("\t[2] Height in Centimeter to Feet and Inches");
print("\t[3] Find LCM of Two Numbers ");
print("\t[4] Sum of First n Natural Numbers");
print("\t[5] Calculate the Simple Interest");
print();
ch=input("\tSelect Your Choice : ")
print();
if(ch=="1"):
    a = int(input("\tEnter first side: "))
    b = int(input("\tEnter second side: "))
    c = int(input("\tEnter third side: "))
    s = (a + b + c) / 2
    area = math.sqrt(s * (s - a) * (s - b) * (s - c))
    print("\tArea of the triangle is: ", round(area, 2))
elif(ch=="2"):
    cm = int(input("\tEnter the height in centimeters:"))
    inches = 0.394 * cm
    feet = 0.0328 * cm
    print("\tThe length in inches", round(inches, 2))
    print("\tThe length in feet", round(feet, 2))
elif(ch=="3"):
    a = int(input("\tEnter the first number:"))
    b = int(input("\tEnter the second number:"))
    if (a > b):
        min1 = a
    else:
        min1 = b
    while (1):
        if (min1 % a == 0 and min1 % b == 0):
           print("\tThe LCM is:", min1)
           break
        min1 = min1 + 1;
elif(ch=="4"):
    n = int(input("\tEnter a number: "))
    sum1 = 0
    while (n > 0):
        sum1 = sum1 + n
        n = n - 1
    print("\tThe sum of first n natural numbers is", sum1)
elif (ch == "5"):
    principle = float(input("\tEnter the principle amount:"))
    time = int(input("\tEnter the time(years):"))
    rate = float(input("\tEnter the rate:"))
    simple_interest = (principle * time * rate) / 100
    print("\tThe simple interest is:", round(simple_interest,2));
else:
    print("\tInvalid Operator. Try Again")
print();
print("\tEND OF PROGRAM");

Basic Calculator in Python

A simple calculator program that will display a menu which contains
four basic mathematics operators like addition, subtraction, multiplication and
division. The user selects an operator from the menu and then provide value and 
the program will perform the computation based on the operator selected by the 
user and display the result on the screen using Python programming language.

I am currently accepting programming work, 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 I also accepting computer repair, networking and Arduino Project development at a very affordable price.

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


Program Listing

# Rollyn M. Moises and Jake R. Pomperada
# calculator.py
# February 6, 2019  Wednesday
# Bacolod City, Negros Occidental
print();
print("\tBASIC CALCULATOR");
print();
print("\t+.......Addition");
print("\t-.......Subtration");
print("\tx.......Multiplication");
print("\t/.......Division");
print();
ch=input("\tSelect Your Choice : ")
print();
a=int(input("\tEnter Value No. 1 : "))
b=int(input("\tEnter Value No. 2 : "))
print();
if(ch=="+"):
    sum=a+b;
    print("\tThe sum of {0} and {1} is {2}.".format(a, b,sum));
elif(ch=="-"):
    sub=a-b;
    print("\tThe difference between {0} and {1} is {2}.".format(a, b,sub));
elif(ch=="x"):
    multiply=a*b;
    print("\tThe product of {0} and {1} is {2}.".format(a, b,multiply));
elif(ch=="/"):
    quotient=a/b;
    print("\tThe quotient of {0} and {1} is {2}.".format(a, b,quotient));
else:
    print("\tInvalid Operator. Try Again")
print();
print("\tEND OF PROGRAM");

Salary Range Checker Using Python

 A program that will ask the user its salary and the program will determine the user salary range using if..elif statement using Python programming language.

I am currently accepting programming work, 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 I also accepting computer repair, networking and Arduino Project development at a very affordable price.

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


Program Listing

# Rollyn M. Moises and Jake R. Pomperada
# largest.py
# February 6, 2019  Wednesday
# Bacolod City, Negros Occidental
print();
print("\tSalary Range Checker ");
print();
salary = int(input("\tEnter First  Value : "));
print();
if (salary <=0) :
    print("\tYour salary ranges is very small. Try Again");
elif (salary >= 1 and salary <= 999)  :
    print("\tYour salary ranges from PHP 1 to PHP 999.");
elif (salary >= 1000 and salary <= 5999) :
    print("\tYour salary ranges from PHP 1,000 to PHP 5,9999.");
elif (salary >= 6000 and salary <= 10999) :
print("\tYour salary ranges from PHP 6,000 to PHP 10,999.");
elif (salary >= 11000 and salary <= 15999):
print("\tYour salary ranges from PHP 11,000 to PHP 15999.");
elif (salary >= 16000 and salary <= 20000) :
print("\tYour salary ranges from PHP 16,000 to PHP 20,000.");
else :
    print("\tYour is above P20,000 and beyond.");
print();
print("\tEND OF PROGRAM");


Find the Day of the Week Using Python

A program that will ask the user to print day name of the week using if elif statement using Python programming language.

I am currently accepting programming work, 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 I also accepting computer repair, networking and Arduino Project development at a very affordable price.

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


Program Listing

# Rollyn M. Moises and Jake R. Pomperada
# largest.py
# February 6, 2019  Wednesday
# Bacolod City, Negros Occidental
print();
print("\tFind the Day of the Week ");
print();
week = int(input("\tEnter Week Number (1-7) : "));
print();
if (week == 1) :
    print("\tThe day is MONDAY.")
elif (week == 2) :
    print("\tThe day is TUESDAY.")
elif (week == 3) :
    print("\tThe day is WEDNESDAY.")
elif (week == 4) :
    print("\tThe day is THURSDAY.")
elif (week == 5) :
    print("\tThe day is FRIDAY.")
elif (week == 6) :
    print("\tThe day is SATURDAY.")
elif (week == 7) :
    print("\tThe day is SUNDAY.")
else :
    print();
    print("\tInvalid Input! Please enter week in between 1-7.");
print();
print("\tEND OF PROGRAM");

Find Largest of Three Numbers Using Python

A program that will ask the user to give three numbers and then the program will find the largest of three numbers using elif statement using Python programming language.

I am currently accepting programming work, 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 I also accepting computer repair, networking and Arduino Project development at a very affordable price.

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


Program Listing

# Rollyn M. Moises and Jake R. Pomperada
# largest.py
# February 6, 2019  Wednesday
# Bacolod City, Negros Occidental
print();
print("\t Find Largest of Three Numbers ");
print();
a = int(input("\tEnter First  Value : "));
b = int(input("\tEnter Second Value : "));
c = int(input("\tEnter Third Value : "));
print();
if (a > b and a > c):
          print("\t{0} is Greater Than both {1} and {2}.". format(a, b, c))
elif (b > a and b > c):
          print("\t{0} is Greater Than both {1} and {2}.". format(b, a, c))
elif (c > a and c > b):
          print("\t{0} is Greater Than both {1} and {2}.". format(c, a, b))
else:
          print("Either any two values or all the three values are equal.")
print();
print("\tEND OF PROGRAM");