Вы находитесь на странице: 1из 2

PHP INDEX

TY BSc
Name: __________________________________ Roll No: ______
Sr.
No Name Page.No Date Sign
Assignment No-1
I)Echo PHP function ,PHP variables .If and switch Statements
1.1 Create a web page ‘evenodd .php’ into root directory of your local web server. 30-07-2018
Here, write a script for finding out whether it is an odd number or even number
and display on the screen.
1.2 Create a web page voter.php into root directory of your local web server. Here, 06-08-2018
write a script for Finding out whether the voter is applicable for vote or not and
display on the screen.
1.3 Create a web page for displaying message based on current time: Good Morning, 13-08-2018
Good Afternoon, Good Evening.
1.4 Create a web page for displaying message based on current month.
1.5 Accept user name and password from user and navigate to home page with 20-08-2018
suitable message.
Assignment No-2
II)PHP operators
2.1 Declare php script to declare 2 variables with specific numeric value of your 27-08-2018
choice and perform the following Operations: Addition, Subtraction,
Multiplication and Division. Also display the result on the screen.
2.2 Write a PHP script to declare 2 variables with specific numeric value of your 27-08-2018
choice and find out the greater number between the two numbers.
2.3 Write a PHP script to declare 1 variable with specific numeric value of your 03-09-2018
choice and find out the number is palindrome or not.
2.4 Write a PHP script to declare 1 variable with specific string value of your choice 03-09-2018
and find out the user-action.
Assignment No-3
III)LOOPS
3.1 Write a PHP script to print the following pattern on the screen. 15-09-2018
*****`
****
***
**
*
3.2 Write a PHP script to Print Sum of digits of entered number.
3.3 Write a PHP script to display following pattern. 22-09-2018
A
A B
A B C
A B C D
A B C D E
3.4 Write a PHP script for displaying prime number from 1 to 100 numbers. 06-19-2018
3.5 Write a program to calculate and print the factorial of a number using a for loop.
3.6 Write a program for Fibonacci series and print series (0 1 1 2 3 5). 13-10-2018
3.7 Write a PHP script that creates the multiplication table with table format (use for
loops).
Assignment No-4
IV)Arrays
4.1 Declare an any array week and the value of days to each index number in the 08-12-2018
order of occurance and display the result on the screen.
4.2 Write a PHP PHP script to display sum of 10 array elements.
4.3 Write an array variable of weather conditions with the following values: rain, 10-12-2018
sunshine, clouds, hail, sleet, snow, wind. Display the result on the screen.
4.4 Create an associative array, using the countries as keys, the cities as values: 15-12-2018
Tokyo, Japan; Mexico City, Mexico; New York City, USA; Mumbai, India;
Seoul, Korea; Shanghai, China; Lagos, Nigeria; Buenos Aires, Argentina, Cairo,
Egypt; London, England in table format. and display the result on the screen.
4.5 Create an multi-dimensional array. Here’s the content for your array: City, 15-12-2018
Country, Continent; Tokto, Japan; Mexico City; Mexico, North America; New
York City, USA, North America; Mumbai, India, Asia; Seoul, Korea, Asia;
Shanghai, China, Asia; Lagos, Nigeria, Africa; Buenos, Aires, Argentina; South
America; Cairo, Egypt, Africa; London, UK, Europe in table format and display
the result on the screen.
4.6 Write a program for sort given array in ascending or descending order. 15-12-2018
Assignment No-5
V)PHP Special variables and PHP and HTML 22-12-2018
5.1 Create a php page and create a user from which asks for user’s information like:
name, address, e-mail ID, mobile number and store this information in database.
5.2 Design a GUI Application PHP which performs arithmetic operations.
5.3 Create a PHP page and create user form which asks for marks in five subjects out 19-01-2019
of 100 and the displays the mark sheet of the student. The format is as follows:
Name of the student*:
Mark in Each Subject: Subject 1*, Subject 2*, Subject 3*, Subject 4*, Subject 5*
Total Marks Obtained:
Total Marks:
Percentage:
5.4 SQL queries through GUI: 02-02-2019
i) Insert
ii) Select
iii) Delete
iv) Update
v) Where clause
vi) Order by clause

Вам также может понравиться