Friday, February 23, 2018

Addition and Subtraction of Two Numbers in PHP

Here is a sample program that I wrote that will accept  two numbers from the user and then it will add and subtract the two value given by the user using PHP as my programming language.

I am currently accepting programming and web development work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.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 is (034) 4335675.





Sample Program Output


Program Listing

index.php

<html>
<head>
 <title>
    Addition  and Subtract of Two Numbers in PHP
 </title>
 <style>
   body {

    background-color: lightgreen;
    font-family: arial;
    font-weight: bold;
    font-size: 15px;
   }


#textInput2 {
    width:170px;
    height:100px;
    margin-left:5px;
 }
 </style>
 </head>
  <?php
  error_reporting(0);
  $x=$_POST['num1'];      
  $y=$_POST['num2']; 

  if(isset($_POST['clear']))
{
             
$x="";
$y="";   
      
}
?>  
<body>
<br><br><br>
<h1> Addition and Subtract of Two Numbers in PHP </h1>
<br><br>
<form method="post">

<label id="textInput2"> Enter first number </label>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input  type="text" name="num1" value="<?php echo $x; ?>" autofocus/>
<br><br>
<label id="textInput2">
 Enter second number </label>
&nbsp;&nbsp;&nbsp;
 <input  type="text" name="num2" value="<?php echo $y; ?>"/>          
<br><br>
<input type="submit"  name="add" value="ADD"/> &nbsp; &nbsp;
<input type="submit"  name="subtract" value="SUBTRACT"/> &nbsp; &nbsp;
<input type="submit"  name="clear"  value="CLEAR"/> 
<br><br><br>
</form>
<?php       
if(isset($_POST['add']))
{
             
$sum=$x+$y;      
echo "Result:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type='text' value='$sum'/ readonly>";            
}

if(isset($_POST['subtract']))
{
             
$subtract=$x-$y;      
echo "Result:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type='text' value='$subtract'/ readonly>";            
}

?>
</body>
</html>




Thursday, February 22, 2018

Custom Software Development Services


Bacolod IT Software Solution and Consultancy

Do you have a problem in your organization in terms of managing your information. We are offering the following IT solution services at a very affordable price and very fast service here in Bacolod City.

Customized Software Development

Services Offered:

1. Custom Software Development
  (Accounting System, 
  Production Management System, 
  Personnel Information System,
  Website Development, 
 Lending System, 
 e-Governance,
  Payroll System, 
 Point of Sale, 
Clinical Information System,
 Medical Laboratory System,
 Sales and Inventory System,
 Enrolment System) 

2. Computer Repair and Maintenance

3. Computer Tutorials
   (Computer Programming,
    Web Development,
    Android Application Development)

4. IT Consultancy

5. Computer Networking And Administration


For more information you can send us an email at the following email address below.

jakerpomperada@yahoo.com

jakerpomperada@gmail.com

You can also reach me in my mobile number 09173084360 or telephone number (034) 4335675.

Thank you.




Wednesday, February 21, 2018

Password Management System in Microsoft Visual Foxrpo 9

A very simple password management system that I wrote using Microsoft Visual Foxpro 9 which allows the user to register information and upload pictures. This application can be used to protect your database application from unauthorized users in your system.

I am currently accepting programming and web development work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.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 is (034) 4335675.


























Sample Program Output, Table Structure and Sample Records



Program Listing


Password.scx
============
Object : Form1 Procedure: Init

 SELECT 1
 USE users

 thisform.text2.value =0
 thisform.text2.Visible= .F.
 thisform.txtusername.SetFocus

 READ events

Ok Button
========
Object : Command1 Procedure: Click

SET DEFAULT TO d:\vfp\password\
SELECT users

LOCATE FOR ALLTRIM(LOWER(username)) == ALLTRIM(LOWER(thisform.txtusername.value)) AND ALLTRIM(LOWER(password)) ==  ALLTRIM(LOWER(thisform.txtpassword.Value)) 
       
        IF FOUND() then
           DO form menu 
            thisform.Release
            thisform.Hide
            RETURN .t.
        endif

if thisform.text2.Value <3 then
thisform.text2.Value = thisform.text2.Value +1
thisform.txtusername.Value=""
thisform.txtpassword.Value =""
thisform.txtusername.SetFocus
thisform.label1.caption ="User login attempt number " + TRANSFORM(thisform.text2.value) + "."
endif
IF thisform.text2.Value = 3 then
  MESSAGEBOX("Please contact your programmer to solve this problem")
  thisform.txtusername.Enabled= .F.
  thisform.txtpassword.Enabled= .F.
  thisform.command1.Enabled= .F.
  ENDIF


Register Button
===============
Object: Command3   Procedure: Click

thisform.Release
thisform.hide
DO FORM record_management

Cancel Button
=============
Object: Command2   Procedure: Click


thisform.Release
CLEAR EVENTS
CLOSE ALL
Quit

record_management.scx
=====================

New Button
============
Object: Command2   Procedure: Click

thisform.txtId.value=0
 thisform.txtUsername.value=""
 thisform.txtPassword.value=""
 thisform.txtLastname.value=""
  thisform.txtFirstname.value=""
  thisform.txtPixpath.value=""
  thisform.txtId.setfocus


Grid
=====
Object: grdUsers Procedure: Click

SELECT users

thisform.txtId.Value=id
thisform.txtUsername.Value = username
thisform.txtPassword.Value = password
thisform.txtLastname.Value = lastname
thisform.txtFirstname.Value = firstname
thisform.txtPixpath.Value = pixpath

     

  Save Button
============
Object: Command3   Procedure: Click

SELECT users


locate for id == thisform.txtId.value
if !found()
   && new record
   if Messagebox("Are you sure to add new record?",32+4,"Confirmation") = 6
   append blank  && add new record
   replace id WITH thisform.txtId.Value
   replace lastname WITH UPPER(ALLTRIM(thisform.txtLastname.value))
   replace firstname WITH UPPER(ALLTRIM(thisform.txtFirstname.Value))
   replace username WITH thisform.txtUsername.Value
   replace password WITH thisform.txtPassword.Value
   replace pixpath WITH thisform.txtPixpath.value
   
  endif
 else && update record
       if Messagebox("Are you sure to update existing record?",32+4,"Confirmation") = 6
       replace id WITH thisform.txtId.Value
     replace lastname WITH UPPER(ALLTRIM(thisform.txtLastname.value))
    replace firstname WITH UPPER(ALLTRIM(thisform.txtFirstname.Value))
    replace username WITH thisform.txtUsername.Value
  replace password WITH thisform.txtPassword.Value
  replace pixpath WITH thisform.txtPixpath.value && overwrite existing record
     endif
  endif

  thisform.grdUsers.refresh


 Delete Button
============
Object: Command4   Procedure: Click

 select users
SET DELETED on
locate for id = thisform.txtId.value
if found()
   
   if Messagebox("Are you sure to delete this record?",32+4,"Confirmation") = 6
   delete
  endif
 ENDIF
 thisform.txtId.value=0
 thisform.txtUsername.value=""
 thisform.txtPassword.value=""
 thisform.txtLastname.value=""
  thisform.txtFirstname.value=""
  thisform.txtPixpath.value=""
  thisform.txtId.setfocus

  thisform.refresh
  thisform.grdusers.refresh
  
 Close Button
============
Object: Command5   Procedure: Click

thisform.Release
DO FORM password 

PixPath Button
==============
Object: Command1   Procedure: Click

thisform.txtPixpath.value = GETPICT()
thisform.txtPixpath.Refresh

menu.scx
========
Object: Form1     Procedure: Init

SELECT users
fullname = TRIM(firstname) + "   " + TRIM(lastname)
thisform.label1.Caption = "Welcome " +fullname
thisform.image1.Picture=TRIM(pixpath)
thisform.image1.Visible= .T.

Close Button
===========
Object: Command1   Procedure: Click

thisform.Release
thisform.hide
DO FORM password








Login System with User Name With Pictures in Microsoft Visual Foxpro

A login program that I wrote that will allow the user to login and if the user is a registered it will display the username and its pictures. The code is very easy to understand and use that I wrote using Microsoft Visual Foxpro 9.

I am currently accepting programming and web development work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.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 is (034) 4335675.





Table Structure and Sample Records










Sample Program Output


Program Listing

Password Form

Object: Form1    Procedure: Init
=====================================

 thisform.text2.value =0
 thisform.text2.Visible= .F.
 thisform.txtPassword.PasswordChar = "*"
 thisform.txtusername.SetFocus

 
 Ok Button
 
 Object: Command1 Procedure: Click
 ========================================

SET DEFAULT TO d:\vfp\password\
 
SELECT users

LOCATE FOR ALLTRIM(LOWER(username)) == ALLTRIM(LOWER(thisform.txtusername.value)) AND ALLTRIM(LOWER(password)) =  ALLTRIM(LOWER(thisform.txtpassword.Value)) 
        
         IF FOUND() then
            DO form menu 
             thisform.Release
             thisform.Hide
             RETURN .t.
         endif

if thisform.text2.Value <3 then
thisform.text2.Value =  thisform.text2.Value +1
thisform.txtusername.Value=""
thisform.txtpassword.Value =""
thisform.txtusername.SetFocus
thisform.label1.caption ="User login attempt number " + TRANSFORM(thisform.text2.value) + "."
endif
IF thisform.text2.Value = 3 then
  MESSAGEBOX("Please contact your programmer to solve this problem")
  thisform.txtusername.Enabled= .F.
  thisform.txtpassword.Enabled= .F.
  thisform.command1.Enabled= .F.
  ENDIF
  
  
  Cancel Button
 
 Object: Command2 Procedure: Click
 ========================================
 
 
thisform.Release


Menu Form

Object: Form1  Procedure: Init


SELECT users
fullname = TRIM(firstname) + "   " + TRIM(lastname)
thisform.label1.Caption = "Welcome " +fullname
thisform.image1.Picture=TRIM(pixpath)
thisform.image1.Visible= .T.

Close Button

Object: Command1 Procedure: Click
=========================================
 
thisform.Release
thisform.hide
DO FORM password



DOWNLOAD SOURCE CODE HERE

Tuesday, February 20, 2018

String Palindrome Checker in Visual Foxpro


A very simple program that I wrote using Microsoft Visual Foxpro 9 that will ask the user to give a word and a string and then our program will check if the given word or string is a Palindrome or Not a Palindrome. I provided also a an error checking code if the textbox if empty.

I am currently accepting programming and web development work kindly contact me in the following email address for further details. Thank you.

My email address are the following jakerpomperada@gmail.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 is (034) 4335675.






Sample Program Output


Program Listing


Object:  Form1      Procedure: Init
 ===================================

thisform.text1.Value=""

Check Button

Object:  Command1      Procedure: Click
 ===================================

&& Palindrome Program in Visual Foxpro
&& Written By Mr. Jake R. Pomperada, MAED-IT
&& February 20, 2018    Tuesday  

LOCAL StrOriginal, StrReverse
StrOriginal=allTRIM(UPPER(thisform.text1.value))
StrReverse=""
FOR StrCount=LEN(StrOriginal) TO 1 STEP -1
 StrReverse=ALLTRIM(UPPER(StrReverse))+SUBSTR(StrOriginal,StrCount,1)
ENDFOR 


IF EMPTY(thisform.text1.Value) then
    MESSAGEBOX("Can't be empty.",64,"Reminder")
    thisform.text1.SetFocus
    RETURN .t.
    endif

IF (StrReverse == StrOriginal) then
   thisform.label1.Caption = "The given word " + ALLTRIM(UPPER(TRANSFORM(thisform.text1.Value))) + " is a Palindrome."
   ELSE
   thisform.label1.Caption = "The given word " + ALLTRIM(UPPER(TRANSFORM(thisform.text1.Value))) + " Not a Palindrome."
 ENDIF


 Clear Button

  Object:  Command2      Procedure: Click
 ===================================

WITH thisform
     .text1.value=""
     .label1.caption=""
     .text1.setfocus
endwith


Quit Button

 Object:  Command3      Procedure: Click
 ===================================

thisform.Release