V Semester JavaScript & PHP Program List for the Academic Year 2020-21 ___________________________________________________________________________________ Program number 1 Write a JavaScript program to perform find the area and circumference of a circle Area and Circumference
Enter the radius :
.............................................................................................................. Program number 2 Jishna K, CAS Thamarassery Write a JavaScript program to check whether a given number is perfect,abundant or deficient. Use an alert box to display the output.

Enter the Number


.............................................................................................................. Program number 3 Design a JavaScript program to display the multiplication table by accepting the number and the limit. Jishna K, CAS Thamarassery multiplication table

Multiplication table

Enter the number :
Enter the range :
.............................................................................................................. Program number 4 Design a form that accepts two integers. Provide 4 buttons for Add, Subtract, Multiply, Divide. Add JavaScript program to add, subtract, multiply and divide the given numbers when these buttons are clicked. Use an output element to display the results. Jishna K, CAS Thamarassery Arithmetic operation

Arithmetic operation

Enter the number1 :
Enter the number2 :
.............................................................................................................. Program number 5 Write a JavaScript program to store different colors in an array and change the background color of the page using these array elements color

Change background color

.............................................................................................................. Program number 6 Write a JavaScript program to check whether a given string is palindrome or not. Jishna K, CAS Thamarassery Palindrome .............................................................................................................. Program number 7 Write a JavaScript Program to create an Array and read values using Prompt popup box and display the sum of elements in an Alert Box. sum of digit Jishna K, CAS Thamarassery .............................................................................................................. Program number 8 Change the text colour and back colour of a TextBox using onfocus and onBlur event. event

onFocus and onBlur event

.............................................................................................................. Program number 9 Write a JavaScript program to display the Capital of a country using onchange events. The county is selected from a select box and capital is displayed on a TextBox. country capital

Country and its capital

.............................................................................................................. Program number 10 Write a JavaScript program for Password validation based on the following condition • Password and confirm password must be same • Length of password must be greater than 8 characters

REGISTRATION FORM

USERNAME :
PASSWORD :
RE-ENTER PASSWORD :
.............................................................................................................. Program number 11 Write a PHP program to check whether a given number is Armstrong or not.

Armstrong or not

Enter the number :
.............................................................................................................. Program number 12 Display the Fibonacci series up to a given number.
Enter limit :

"; $c=$a+$b; $a=$b; $b=$c; } } ?> .............................................................................................................. Jishna K, CAS Thamarassery Program number 13 Create a PHP program to display the bio data of a person by reading the personal details using an HTML page.

BIO DATA

Name:
Date of birth :
Gender : Male Female
Educational qualification :
Name of father :
Name of mother :
Phone number:


Personal Details
"; echo "..................................
"; echo "Name : $name
"; echo "Date of Birth : $dob
"; echo "Gender : $gender
"; echo "Qualification : $qualification
"; echo "Name of father : $fname
"; echo "Name of mother : $mname
"; echo "Phone number : $phone
"; } ?> .............................................................................................................. Program number 14 Write a PHP function to reverse a string
Enter the string :

= 0 ; $i--) Jishna K, CAS Thamarassery { echo $str[$i]; } } ?> .............................................................................................................. Program number 15 Write a PHP program to check whether a given number is perfect, abundant or deficient.

Enter the Number


$no) echo "Abundant Number"; else Jishna K, CAS Thamarassery echo "Deficient Number"; } ?> .............................................................................................................. Program number 16 Create a login page using the database.
Username:

Password:


$usr1, You are Logged Successfully..."; Jishna K, CAS Thamarassery else echo "Login Denied"; } } ?> .............................................................................................................. Program number 17 PHP program to store current date-time in a cookie and display the Last visited date-time on the web page upon revisiting the same web page.

Last visited time on the web page


.............................................................................................................. Program number 18 Write an HTML page to display a list of fruits in a list box. Write a php program to display the selected fruits in a webpage. Jishna K, CAS Thamarassery
Choose Your Favorite Fruit
You have indicated that you like " .$_POST['f']. ""; } ?> .............................................................................................................. Program number 19 Write a PHP program to create an array and store 10 names in the array. Do the following operations. a. Display the contents using for each statement. b. Display the array in a sorted order. c. Display the array without the duplicate elements d. Remove the last element and display e. Display the array in reverse order f. Search an element in the given array. Jishna K, CAS Thamarassery

Array Operations

Display Array
Sorted Array
Without Duplicate
Delete Last
Array Reverse
Array Search

Display Array"; foreach($names as $value) echo "
".$value; break; case "srt" : echo "

Sorted Array

"; sort($names); foreach($names as $value) echo "
".$value; break; case "usrt": echo "

List unique Array elements

"; $uarray=array_unique($names); foreach($uarray as $value) echo "
".$value; break; case "pop" : echo "

Delete last element

"; Jishna K, CAS Thamarassery array_pop($names); foreach($names as $value) echo "
".$value; break; case "rev" : echo "

Reverse Array

"; $revarr=array_reverse($names); foreach($revarr as $value) echo "
".$value; break; case "sear": echo "

Search Array element

"; echo "
Element deleted at index".array_search("Jhon",$names,true); break; } } ?> .............................................................................................................. Program number 20 Create a table student with fields roll no, name, mark, grade. Insert some records in the table. Write a PHP program to display the mark list of a student by accepting the register no. of the student. Marklist

Marksheet

Regno:


Jishna K, CAS Thamarassery \n"; echo "rollno: $row[0]
name: $row[1]
mark: $row[2]
grade: $row[3]"; } } ?> .............................................................................................................. Jishna K, CAS Thamarassery