The document contains a list of 21 PHP programming tasks, each with a brief description of the task and the expected output. Tasks include printing 'hello world', checking for odd or even numbers, finding the maximum of three numbers, swapping numbers, and implementing various functions such as factorial and palindrome checks. Additionally, it covers form handling, database creation, and file upload functionalities in PHP.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
2 views31 pages
PHP Lab
The document contains a list of 21 PHP programming tasks, each with a brief description of the task and the expected output. Tasks include printing 'hello world', checking for odd or even numbers, finding the maximum of three numbers, swapping numbers, and implementing various functions such as factorial and palindrome checks. Additionally, it covers form handling, database creation, and file upload functionalities in PHP.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31
1. Write a PHP script to print “hello world”.
Program Code : Output :
2. Write a PHP script to find odd or even number from given number. Program Code : Output : 3. Write a PHP script to find maximum of three numbers. Program Code : Output : 4. Write a PHP script to swap two numbers. Program Code : Output : 5. Write a PHP script to find the factorial of a number.
Program Code : Output :
6. Write a PHP script to check whether given number is palindrome or not. Program Code : Output : 7. Write a PHP script to reverse a given number and calculate its sum Program Code : Output : 8. Write a PHP script to generate a Fibonacci series using Recursive function
Program Code : Output :
9. Write a PHP script to implement at least seven string functions. Program Code : Output : 10. Write a PHP program to insert new item in array on any position in PHP. Program Code : Output : 11. Write a PHP script to implement constructor and destructor Program Code : Output : 12. Write a PHP script to implement form handling using get method Program Code : Output : 13. Write a PHP script to implement form handling using post method. Program Code : Output : 14. Write a PHP script that receive form input by the method post to check the number is prime or not. Program Code : Output : 15. Write a PHP script that receive string as a form input Program Code : Output : 16. Write a PHP script to compute addition of two matrices as a form Program Code : input. Output : 17. Write a PHP script to show the functionality of date and time function. Program Code : Output : 18. Write a PHP program to upload a file. Program Code : Output : After clicking “upload” Open “c:\\xampp\\” ….Your uploaded file will be here.
Uploaded file is here.
19. Write a PHP script to implement database creation. Program Code : Output : Database “shubhang1” is created.
shubhang1 - Database 20. Write a PHP script to create table Program Code : Output : “admission_form” table is created.
Admission_form table created.
All attributes in the table. (Name, FatherName, ContactNumber…so-on) 21. Develop a PHP program to design a college admission form using MYSQL database. Program Code : Output : HTML Code Php code for 21st program. form12.php Create database “college” and table “application” Create all the columns with same attributes – sname, fname, dob, gender….so-on. Fill the Admission form.
And click “Submit”.
Record inserted successfully. Your data is stored here.
Maharashtra State Council of Examination, Pune NATIONAL TALENT SEARCH EXAM 2020 21 (STD. 10th) DT. 13 DEC 2020 SC Category Selected List For National Level Exam