Categories
PHP

Square Root a Number in PHP

In this tutorial, I will show how to write a PHP program that will ask the user to give a number and then the program will convert the given number to its square 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 at 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 I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com

If you like this video please click the LIKE button,SHARE, and SUBSCRIBE to my channel.

Your support on my channel is highly appreciated.

Thank you very much.

Program Listing

<html>
  <head> 
   <title>Square Root Number in PHP </title>
  </head>
  <body> 
      <style type="text/css">
      
      body {
        font-family: arial;
            size: 12px;
      };

        </style>
    <?php
 
     $num_values = $_POST['num_val'];

  
   if(isset($_POST['submit'])) {
                  
      $square_root = sqrt($num_values);

      $results ="The Square Root number
       equivalent of $num_values is $square_root.";
    }

 if(isset($_POST['clear'])) {
      $num_values = "";
      $results = "";
    }
?>

  <h2> Square Root a Number in PHP </h2>
  <p> Mr. Jake Rodriguez Pomperada,MAED-IT, MIT </p>
<form method="post">
   <p>Give a Number <input 
    type="numeric" name="num_val"
     value="<?php echo $num_values; ?>" autofocus required /></p>
      
<input type="submit" name="submit" 
   title="Click here to compute the square value. "
   value="Submit" />
   
    &nbsp;&nbsp;&nbsp;
    <input type="submit" name="clear" 
    title="Click here to clear the textbox."
    value="Clear" />
</form>

<?php
   echo $results;
?>
</body>
</html>
Categories
PHP

Perfect Number in PHP

  In this tutorial, I will show you how to write a program to ask the user to give a number and then the program will check if  the given number is a perfect number or not  using PHP 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 City I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com

If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.

Your support on my channel is highly appreciated.

Thank you very much.

Program Listing

<html>

  <head> 

   <title>Perfect Number in PHP </title>

  </head>

  <body> 

      <style type="text/css">

      

      body {

        font-family: arial;

            size: 12px;

      };



        </style>

    <?php

 

     $num_values = $_POST['num_val'];



  function CheckPerfect($num) {

  

  $i = 1;

  $total = 0;



  for($i=1; $i<$num; $i++)

  {

  if($num % $i == 0)

      $total += $i;

} 



  if($total == $num)

    $message = "$num is a perfect number.";

  else

    $message = "$num is not a perfect number.";

     return $message;

    }





   if(isset($_POST['submit'])) {

                  

      $results= CheckPerfect($num_values);

       

      }



 if(isset($_POST['clear'])) {

      $num_values = "";

      $results = "";

    }

?>



  <h2> Perfect Number in PHP </h2>

  <p> Mr. Jake Rodriguez Pomperada,MAED-IT, MIT </p>

<form method="post">

   <p>Give a Number <input 

    type="numeric" name="num_val"

     value="<?php echo $num_values; ?>" autofocus required /></p>

      

<input type="submit" name="submit" 

   title="Click here to compute the cube root. "

   value="Submit" />

   

    &nbsp;&nbsp;&nbsp;

    <input type="submit" name="clear" 

    title="Click here to clear the textbox."

    value="Clear" />

</form>



<?php

   echo $results;

?>

</body>

</html>
Categories
PHP

Addition of Six Numbers in PHP

In this  tutorial, I will show you how a program using PHP to ask the user to give six numbers and then

the program will compute the sum of six numbers given  by the user.

 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 City I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com

If you like this video please LIKE, SHARE, and SUBSCRIBE to my channel.

Thank you very much for your support.

Program Listing

<!DOCTYPE html>
<html lang="en">
<head>
     <meta charset="UTF-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <title>Addition of Six Numbers in PHP</title>

     <style>
          body {
               background: #f1f1f1;
               font-family: arial;
               size : 16px;

          }
          form {
               background-color: rgba(0, 0, 0, 0.7);
               color: #000;
               padding: 50px;
               position: absolute;
               -webkit-transform: translate(-50%, -50%);
               transform: translate(-50%, -50%);
               left: 50%;
               top: 50%;
          }
          .row {
               display: block;
               font-size: 0;
               margin-bottom: 18px;
          }
          h1 {
               color: #fefefe;
               text-align: center;
               margin: 0 0 40px 0;
          }
          .row label {
               width: 180px;
               color: #fefefe;
               text-transform: uppercase;
               padding-left: 0!important;
          }
          .row input,
          .row textarea {
               background-color: #fefefe;
               width: 280px;
               color: #000000;
          }
          .row textarea {
               resize: none;
          }
          .row label,
          .row input,
          .row textarea {
               vertical-align: top;
               display: inline-block;
               border: 0;
               margin: 0;
               padding: 15px;
               font-size: 15px;
          }
          form button {
               background-color: #16222A;
               width: 250px;
               display: inline-block;
               border: 0;
               padding: 15px;
               color: #fefefe;
               font-size: 15px;
               text-transform: uppercase;
               cursor: pointer;
          }
          form #btnClear {
               background-color: #486980;
          }
          input:focus,
          select:focus,
          textarea:focus,
          button:focus {
               outline: none;
          }
     </style>
</head>
<body>
     <?php
     error_reporting(0);

     $num1 = $_POST['txtFirstNum'];
     $num2 = $_POST['txtSecondNum'];
     $num3 = $_POST['txtThirdNum'];
     $num4 = $_POST['txtFourthNum'];
     $num5 = $_POST['txtFifthNum'];
     $num6 = $_POST['txtSixthNum'];
    
     $result = $_POST['txtResult'];

 
   if(isset($_POST['submit'])) {
      
       $result = ($num1+$num2+$num3+$num4+$num4+$num5+$num6);
       
      }

     if(isset($_POST['clear'])) {
       $num1 = "";
       $num2 = "";
       $num3 = "";
       $num4 = "";
       $num5 = "";
       $num6 = "";
       $result="";
    }
    
    ?>  

     <form action="" method="post">
          <h1>Addition of Six Numbers in PHP</h1>
          <div class="row">
               <label for="txtFirstNum">Give First Number</label>
               <input type="text" name="txtFirstNum" id="txtFirstNum"
                value="<?php echo $num1; ?>" autofocus>>
          </div>
          <div class="row">
               <label for="txtSecondNum">Give Second Number</label>
               <input type="text" name="txtSecondNum" id="txtSecondNum"
               value="<?php echo $num2; ?>">>
          </div>
          <div class="row">
               <label for="txtThirdNum">Give Third Number</label>
               <input type="text" name="txtThirdNum" id="txtThirdNum"
               value="<?php echo $num3; ?>">>
          </div>
          <div class="row">
               <label for="txtFourthNum">Give Fourth Number</label>
               <input type="text" name="txtFourthNum" id="txtFourthNum"
               value="<?php echo $num4; ?>">>
          </div>
          <div class="row">
               <label for="txtFifthNum">Give Fifth Number</label>
               <input type="text" name="txtFifthNum" id="txtFifthNum"
                 value="<?php echo $num5; ?>">
          </div>
          <div class="row">
               <label for="txtSixthNum">Give Sixth Number</label>
               <input type="text" name="txtSixthNum" id="txtSixthNum"
               value="<?php echo $num6; ?>">
          </div>
           <div class="row">
               <label for="txtSixthNum">The Result</label>
               <input type="text" name="txtResult" id="txtResult"
               value="<?php echo $result; ?>">
          </div>
          <div classs="row">
               <button type="submit" name="submit" 
               id="btnCompute">Compute</button>
               <button type="submit" name="clear"
                id="btnClear">Clear</button>
          </div>
     </form>
</body>
</html>
Categories
PHP

HTML Forms Input and Display in PHP

 In this tutorial I will show you how to create and use HTML forms with PHP 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 at 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 I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com

Your support on my channel is highly appreciated.

Thank you very much.

Program Listing
<html>

  <head> 

   <title>HTML Forms Input and Display in PHP</title>

  </head>

  <body> 

    <style type="text/css">

      

      body {

        font-family: arial;

            size: 12px;

      };

    </style>

   

   <?php

     $display="";

     $firstname = $_POST['firstname'];

     $middlename = $_POST['middlename'];

     $lastname   = $_POST['lastname'];



   if(isset($_POST['submit'])) {

      $display .= "<h2> Display Results </h2>";

      $display .= "First Name  : " .

                  strtoupper($firstname) ."<br/>";

      $display .= "Middle Name : " . 

                  strtoupper($middlename)."<br/>";

      $display .= "Last Name   : " . 

                    strtoupper($lastname)."<br />";

    }



if (isset($_POST['clear'])) {

   $firstname ="";

   $middlename ="";

   $lastname ="";

   $display ="";

   } 

 ?>   

    <h2> HTML Forms Input and Display in PHP </h2>

<form method="post">

   <p>First Name: <input type="text" name="firstname"

    value="<?php echo $firstname; ?>" autofocus

    ></p>

   <p>Middle Name: <input type="text" name="middlename"

    value="<?php echo $middlename; ?>"></p>

   <p>Last Name: <input type="text" name="lastname" 

    value="<?php echo $lastname; ?>"></p>

   <input type="submit" name="submit" value="Submit" />

   &nbsp;&nbsp;&nbsp;

   <input type="submit" name="clear" value="Clear" />

</form>

  <?php



    echo $display;

   ?> 

 </body>

 </html>
Categories
PHP

Interest Rate Solver in PHP

I wrote this interest rate solver 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.comMy 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
Sample Program Output

<!doctype html>
<html>
	<head>
		<title>Interest Rate Solver in PHP</title>
	</head>
	<style type="text/css"> 
	  body {	
		font-family : arial;		
	};
	</style>
	<body>
		<form method="POST" action="">
			<h2>Interest Rate Solver in PHP</h2>
<?php
$amount=$interest_rate=$period=NULL;
$total_interest=$total_payable=$monthly_payable=0;
if(isset($_POST['compute'])){
	$amount=$_POST['amount'];
	$interest_rate=$_POST['interest_rate'];
	$period=$_POST['period'];
	
	$total_interest=$amount*($interest_rate/100)*$period;
	$total_payable=$total_interest+$amount;
	$monthly_payable=$total_payable/$period;
}
?>
			<p>Amount Needed: <input type="text" name="amount" size="8" value="<?=$amount;?>"/></p>
			<p>Interest Rate: <input type="text" name="interest_rate" size="8" value="<?=$interest_rate;?>"/></p>
			<p>Payment Period: <input type="text" name="period" size="8" value="<?=$period;?>"/></p>
			<p><input type="submit" name="compute" value="Compute"/></p>
			<p>
				Loan Amount: <?=number_format($amount, 2);?><br/>
				Total Interest: <?=number_format($total_interest, 2);?><br/>
				Total Payable: <?=number_format($total_payable, 2);?><br/>
				Monthly Payable: <?=number_format($monthly_payable, 2);?>
			</p>
		</form>
	</body>
</html>
Categories
PHP

Fahrenheit To Celsius in PHP

A program that will convert Fahrenheit temperature into Celsius temperature equivalent 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.comMy 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/

Program Listing

<?php
$cel=$fah=0;
if(isset($_POST['convert'])){
	$fah=$_POST['fah'];
	$cel=($fah-32)*5/9;
}
?>
<!doctype html>
<html>
	<head>
		<title>Fahrenheit To Celsius in PHP</title>
	</head>
	<body>
		<form method="POST" action="">
			<h2>Fahrenheit To Celsius in PHP</h2>		
			Fahrenheit: <input type="text" name="fah" value="<?=$fah;?>" size="5"/> =
			<input type="text" name="cel" value="<?=$cel;?>" size="5"/> Celsius
			<br/><br/>
			<input type="submit" name="convert" value="Convert"/>
		</form>
	</body>
</html>
Categories
PHP

Celsius To Fahrenheit in PHP

A Celsius To Fahrenheit temperature converter program written in 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.comMy 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/

Program Listing

<?php
$cel=$fah=0;
if(isset($_POST['convert'])){
	$cel=$_POST['cel'];
	$fah=$cel*9/5+32;
}
?>
<!doctype html>
<html>
	<head>
		<title>Celsius To Fahrenheit in PHP</title>
	</head>
	<body>
		<form method="POST" action="">
			<h2>Celsius To Fahrenheit in PHP</h2>		
			Celsius: <input type="text" name="cel" value="<?=$cel;?>" size="5"/> =
			<input type="text" name="fah" value="<?=$fah;?>" size="5"/> Fahrenheit
			<br/><br/>
			<input type="submit" name="convert" value="Convert"/>
		</form>
	</body>
</html>
Categories
PHP

Calculator in PHP

A calculator program written in 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.comMy 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/


Program Listing

<!doctype html>
<html>
	<head>
		<title>Calculator in PHP</title>
	</head>
	<body>
		<form method="POST" action="">
			<h2>Calculator in PHP</h2>
<?php
$n1=$n2=$res=0;
if(isset($_POST['operation'])){
	$n1=$_POST['n1'];
	$n2=$_POST['n2'];
	$operation=$_POST['operation'];
	
	if($operation=="Add"){
		$res=$n1+$n2;
	}elseif($operation=="Subtract"){
		$res=$n1-$n2;
	}elseif($operation=="Multiply"){
		$res=$n1*$n2;
	}else{
		$res=$n1/$n2;
	}
}
?>			
			
			<p>Num1: <input type="text" name="n1" value="<?=$n1;?>" size="5"/></p>
			<p>Num2: <input type="text" name="n2" value="<?=$n2;?>" size="5"/></p>
			<p>
				<input type="submit" name="operation" value="Add"/>
				<input type="submit" name="operation" value="Subtract"/>
				<input type="submit" name="operation" value="Multiply"/>
				<input type="submit" name="operation" value="Divide"/>
			</p>
			<p>Result: <input type="text" name="res" value="<?=$res;?>" size="5"/></p>
		</form>
	</body>
</html>
Categories
Perl

unless-else Statement in Perl

I wrote this simple program in Perl programming language to demonstrate how to use unless-else statement.

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

# unless_else_example.pl
# Author  : Jake Rodriguez Pomperada,MAED-IT,MIT
# Date    : April 26, 2020  Sunday  4:10 PM
# Email   : jakerpomperada@gmail.com
# Websites : http://www.jakerpomperada.com
#            http://www.jakerpomperada.blogspot.com

print "\n\n";
print "\tunless-else Statement Example ";
print "\n\n";
print "\tGive a Number : ";
chomp($num=<>);
print "\n"; 
unless($num>=200) {
   #This print statement would execute,
   #if the given condition is false
   printf "\tThe given number $num is less than 200.";
}
else {
   #This print statement would execute,
   #if the given condition is true
   printf "\tThe given number $num is greater than or equal to 200.";
}
print "\n\n";
print "\tEnd of the Program";
print "\n\n";

Categories
Perl

String Upper Case in Perl

I wrote this Perl program to ask the user to give a string and then the program will convert the given string into the uppercase format.

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

# uppercase_string.pl
# Author   : Jake R. Pomperada,MAED-IT,MIT
# Date     : April 8, 2020   Wednesday  6:12 PM
# Location : Bacolod City, Negros Occidental
# Email    : jakerpomperada@gmail.com
# Website  : http://www.jakerpomperada.com

    print("\n");
    print("\tString Upper Case in Perl");
    print("\n\n");
  
    print("\tGive a String : ");
    chomp($str=<STDIN>);

    $display = uc $str;

    print("\n\n");
    print "\tThe upper case equivalent of the string is $display.";
    print("\n\n");
    print("\t\tEnd of Program");

    print("\n\n");