Tuesday, March 31, 2020

Addition of Three Numbers in C

A simple program to ask the user to give three numbers and then the program will add the sum of three numbers and display the results on the screen using 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.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/


Sample Program Output


Program Listing

addition.c

#include <stdio.h>

int main() 
 {
  int a=0,b=0,c=0;
  int sum=0;
   
   system("COLOR F0");
   printf("\n\n");
   printf("\tAddition of Three Numbers");
   printf("\n\n");
   printf("\tGive Three Numbers : ");
   scanf("%d%d%d",&a,&b,&c);
 
   sum = (a+b+c);
  
   printf("\n");
   printf("\tThe total sum of %d, %d and %d is %d.",a,b,c,sum);
   printf("\n\n");
   printf("\tEnd of Program");
   printf("\n\n");
  
}

Monday, March 30, 2020

Add Record in PHP and MySQL

This code shows you how to add a record in MySQL database using PHP as my 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.mindshaperspublishing.com/

https://www.unlimitedbooksph.com/


Program Listing

add.php

<html>
<head>
<title>Add Persons Record in PHP and MySQL</title>
</head>

<body>
<?php

include_once("config.php");

if(isset($_POST['Submit'])) {
  $fname = mysqli_real_escape_string($mysqli, $_POST['fname']);
    $lname = mysqli_real_escape_string($mysqli, $_POST['lname']);
    $mname = mysqli_real_escape_string($mysqli, $_POST['mname']);
    $gender = mysqli_real_escape_string($mysqli, $_POST['gender']);
    
    $status = mysqli_real_escape_string($mysqli, $_POST['status']);
    $bdate = mysqli_real_escape_string($mysqli, $_POST['bdate']);
    $bplace = mysqli_real_escape_string($mysqli, $_POST['bplace']);
    $address = mysqli_real_escape_string($mysqli, $_POST['address']);
    $nationality = mysqli_real_escape_string($mysqli, $_POST['nationality']);
   
if(empty($fname) || empty($lname) || empty($gender)) {

if(empty($fname)) {
echo "<font color='red'>First Name field is empty.</font><br/>";
}

if(empty($lname)) {
echo "<font color='red'>Last Name field is empty.</font><br/>";
}

if(empty($gender)) {
echo "<font color='red'>Gender field is empty.</font><br/>";
}

echo "<br/><a href='javascript:self.history.back();'>Go Back</a>";
} else { 


$result = mysqli_query($mysqli, "INSERT INTO student(fname,lname,gcode,mname,status,bdate,bplace,address,nationality) VALUES('$fname','$lname','$gender','$mname','$status','$bdate','$bplace','$address','$nationality')");
        
        echo"<script>alert('Data added successfully');window.location.href='index.php'</script>";

}
}
?>
</body>

</html>

PHP and MySQL Database Connection Using OOP Approach

I this tutorial article I would like to share with you a code on how to connect PHP and MySQL database using mysqli object-oriented programming connection.

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

connectdb.php

<?php

    $host="localhost";
    $username="root";
    $password="12345";
    $database="payroll";

    $conn=new mysqli ($host,$username,$password,$database);
    if ($conn->connect_error)
    {
        die ("failed to connect".$conn->connect_error);
    }

?>

Leap Year Checker Using Unless Elsif Else in Perl

I wrote this simple program to ask the user a year and then the program will check if the given year is a leap year or not a leap year using Unless Elsif Else in Perl 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.mindshaperspublishing.com/

https://www.unlimitedbooksph.com/



Sample Program Output


Program Listing

# leap_year_unless.elsif.pl
# Author  : Jake Rodriguez Pomperada,MAED-IT,MIT
# Date    : March 30, 2020  9:35 AM
# Website : http://www.jakerpomperada.com
# Email   : jakerpomperada@gmail.com

print "\n\n";
print "\tLeap Year Checker Using Unless Elsif Else in Perl";
print "\n\n";
print "\tWhat is the year?  : ";
chomp($year=<>);

unless ($year % 4 != 0) {
    print "\n";
    print "\tThe given year $year is a Leap Year.";
} elsif  ($year % 4 == 0) {
    print "\n\tThe given year $year is Not a Leap Year.";
    print "\t";
} else {
    print "\n";
    print "\tThe given year $year is Not a Leap Year.";
}
print "\n\n";
print "\tEnd of the Program";
print "\n\n";




Grade Checker Using Unless Elsif Else in Perl

I wrote this program to ask the student to give their grade and then the program will check if the given grade is pass or failed using unless elsif else in Perl 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.mindshaperspublishing.com/

https://www.unlimitedbooksph.com/




Sample Program Output


Program Listing

# grade_unless.elsif.pl
# Author  : Jake Rodriguez Pomperada,MAED-IT,MIT
# Date    : March 30, 2020 10:08 AM
# Website : http://www.jakerpomperada.com
# Email   : jakerpomperada@gmail.com

print "\n\n";
print "\tGrade Checker Using Unless Elsif Else in Perl";
print "\n\n";
print "\tWhat is your grade? : ";
chomp($grade=<>);

unless ($grade < 75) {
    print "\n";
    print "\tYour given grade $grade. You Passed the Subject.";
} elsif  ($ygrade >= 75) {
    print "\n\tYour given grade $grade. You Failed the Subject.";
    print "\t";
} else {
    print "\n";
    print "\tYour given grade $grade. You Failed the Subject.";
}
print "\n\n";
print "\tEnd of the Program";
print "\n\n";

Sunday, March 29, 2020

Delete a Record in PHP and MySQL

This code demonstrates how to delete a single record using PHP and MySQL.

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

delete.php

<?php
include("config.php");


$SID = $_GET['SID'];


$result = mysqli_query($mysqli, "DELETE FROM tbl_employees WHERE SID=$SID");



header("Location:index.php");


?>

String in Java

A simple program to show how to declare and use string in Java 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.mindshaperspublishing.com/

https://www.unlimitedbooksph.com/


Program Listing

package com.example.java;

public class Main {

    public static void main(String[] args) {
    System.out.println("Hello from Java Programming!");
        String TString = "David";
        System.out.println("Your name is " + TString);
    }
}

Sum of Two Numbers in Java

A simple java program to accept two numbers and then it will compute the sum of two numbers and display the results 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.mindshaperspublishing.com/

https://www.unlimitedbooksph.com/


Program Listing

package com.example.java;

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        System.out.print("Enter a numeric value: ");
        String input1 = sc.nextLine();
        double d1 = Double.parseDouble(input1);

        System.out.print("Enter a numeric value: ");
        String input2 = sc.nextLine();
        double d2 = Double.parseDouble(input2);

        double result = d1 + d2;

        System.out.println("The answer is " + result);

    }
}


Command Line Argument in Java

I simple program in Java to demonstrate command line argument.

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

public class Main {
public static void main(String[] args) {
System.out.println("Hello from Java!");
System.out.println(args[0]);
}

}


Saturday, March 28, 2020

Feet To Inches Converter Vice Versa in JavaScript

A simple program that I wrote using JavaScript programming language to ask value in feet or inches and it will convert it into feet or inches equivalent.

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/



Sample Program Output



Program Listing

index.htm

<hmtl>
<head>
  <title>Feet To Inches Converter  Vice Versa in JavaScript</title>
 </head>
 <style>
   body {
    font-family:arial;
    size:12px;
  }
 </style>
<body onload="init()">
  <p>Feet To Inches Converter Vice Versa in JavaScript</p>
  <table cellspacing="6">
    <tr valign="top">
      <td><input id="feet" size="20" onfocus="reset()" /><br />Feet</td>
      <td><input type="button" value="Ok" onclick="convert()" title="Click here to convert" /></td>
      <td><input id="inches" size="20" onfocus="reset()" /><br />Inches</td>
      <td><input type="button" value="Clear All" onclick="reset()" title="Click here to clear the text box." /></td>
    </tr>
  </table>
  <script>
  
  var feet, inches;

function init(){
  feet = document.getElementById('feet');
  inches = document.getElementById('inches');
}

function reset(){
  feet.value = "";
  inches.value = "";
}

function convert(){
  var f = feet.value.replace(/ /, "");
  if (f){
    inches.value = f * 12;
  }
  
  var i = inches.value.replace(/ /, "");
  if (i){
    feet.value = i / 12;
  }
}

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



Thursday, March 26, 2020

Money Denominator in C

I wrote this program in C language to demonstrate the money denominator. I am using Dev C++ as my text editor and compiler in writing this program.

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/




Sample Program Output


Program Listing

money.c

/* money.c
   Jake R. Pomperada,MAED-IT
   November 17, 2019
   Bacolod City, Negros Occidental
*/

#include <stdio.h>

int main()
{
    int amount=0;
    
    int note1000=0,note500=0, note100=0, note50=0, note20=0, note10=0, note5=0, note2=0, note1=0;
    

    note1000=note500 = note100 = note50 = note20 = note10 = note5 = note2 = note1 = 0;

    printf("\n\n");
    printf("\tMoney Denominator in C");
    printf("\n\n");
    printf("\tGive an Amount PHP : ");
    scanf("%d", &amount);


    if(amount >= 1000)
    {
        note1000 = amount/1000;
        amount -= note1000 * 1000;
    }

    if(amount >= 500)
    {
        note500 = amount/500;
        amount -= note500 * 500;
    }
    if(amount >= 100)
    {
        note100 = amount/100;
        amount -= note100 * 100;
    }
    if(amount >= 50)
    {
        note50 = amount/50;
        amount -= note50 * 50;
    }
    if(amount >= 20)
    {
        note20 = amount/20;
        amount -= note20 * 20;
    }
    if(amount >= 10)
    {
        note10 = amount/10;
        amount -= note10 * 10;
    }
    if(amount >= 5)
    {
        note5 = amount/5;
        amount -= note5 * 5;
    }
    if(amount >= 2)
    {
        note2 = amount /2;
        amount -= note2 * 2;
    }
    if(amount >= 1)
    {
        note1 = amount;
    }

    printf("\n\n");
    printf("\tTotal number of notes = \n");
    printf("\n");
     printf("\t1000 = %d\n", note1000);
    printf("\t500 = %d\n", note500);
    printf("\t100 = %d\n", note100);
    printf("\t50 = %d\n", note50);
    printf("\t20 = %d\n", note20);
    printf("\t10 = %d\n", note10);
    printf("\t5 = %d\n", note5);
    printf("\t2 = %d\n", note2);
    printf("\t1 = %d\n", note1);
    printf("\n\n");
    printf("\tEnd of Program");
}