PHP Linux Lab Previous
PHP Linux Lab Previous
Qpcode : D2-S2-Q1
1. Write a shell program to check whether two strings are equal or not, length is zero or not
and concatenate the two strings.
2. Create a table login (userid, password, role, visit_count) and insert five records, role must
be admin or user and visit_count is zero for all users to start with. Write a PHP code to
login with valid userid and password and update the visit count field in each visit by one.
Qpcode : D2-S2-Q2
1. Write a menu driven shell program to copy, edit, rename and delete a file.
2. Create an application form using html which contains Name, Address, Dob, Gender,
Mobile No, Blood Group. Write a PHP code to save the data only if the applicant is greater
than eighteen years old.
Software lab examination IV sem BCA/B.Sc CA (TM) December 2021
Qpcode : D2-S2-Q3
1. Write a Shell program to get two file names from the user and check whether they are same
or not. If both the files are same delete the second one.
2. Design an HTML page to accept six marks and write PHP code to find the average
Qpcode : D2-S2-Q4
1. Write a shell script to get two strings from the user and check whether the two strings are
equal or not, length is 0 or not and then concatenate the two strings.
2. Create tables book (bookid, title, author) and issue (issue_date, bookid, student_name).
Insert ten rows to book table and write a PHP code to issue the books
Software lab examination IV sem BCA/B.Sc CA (TM) December 2021
Qpcode : D2-S2-Q5
2. Create a table employee (empno, name, mobile, email) and insert ten records. Design a
PHP page for searching with name.
Software lab examination IV sem BCA/B.Sc CA (TM) December 2021
Qpcode : D2-S1-Q1
2. Create two tables teacher (tid, name, department, designation, dob, mobno) and subject(sid,
tid, subject). Insert five records in each table. Design php pages for searching teacher’s
data and display subject details of that teacher using tid.
Qpcode : D2-S1-Q2
1. Write menu driven shell program to display today’s date, current user and current working
directory.
2. Create a table employee (empno, name, mobile, email) and insert five records. Design a
php page for updating details of employee.
Software lab examination IV sem BCA/B.Sc CA (TM) December 2021
Qpcode : D2-S1-Q3
2. Create a table book (bookid, title, author, price, publisher and number_of_pages) and insert
five records. Design a php page for list all distinct titles and when clicking on the title, it
should show a second page giving book details.
Qpcode : D2-S1-Q4
1. Write a shell script to check whether a file is existing or not. If the file exists then check
whether it is ordinary File, directory file, readable, writable, executable or not
2. Design a web page for applying a vehicle loan with fields Application number, Name,
Address, Mobile number, Loan duration and Loan amount. Write a php code to save the
application to a database.
Software lab examination IV sem BCA/B.Sc CA (TM) December 2021
Qpcode : D2-S1-Q5
1. Write a shell script to get three file names and a directory name as command line argument
and create the three files and the directory in in the current working directory. Display
appropriate message if command line arguments are less than four.
2. Design a webpage for getting Name, Mobile Number, Email and Password of a person.
Write a PHP program to validate the following
a. Mobile Number must be a positive integer and its length is 10
b. Email validation
c. Password contains special characters and numbers
Software lab examination IV sem BCA/B.Sc CA (TM) December 2021
Qpcode : D1-S2-Q1
2. Create a Student table (Adm.No, Name, Dob, Gender,EmailId, MobNumber) and insert
five records. Write php code to search students using Adm No.
Qpcode : D1-S2-Q2
2. Develop a php application for recording employee’s details (EmpNo, Name, Dob,
Address, Mob number). Add five meaningful records
Software lab examination IV sem BCA/B.Sc CA (TM) December 2021
Qpcode : D1-S2-Q3
2. Design a php page for getting marks of six subjects for a student and create a well
formatted marksheet.
Qpcode : D1-S2-Q4
2. Design a webpage for getting Regno, Name, Address, Age and Password. Write a php
program to validate the following
a. Age between 18 and 40
b. Length of password > 8 and it contains special characters and numbers
Software lab examination IV sem BCA/B.Sc CA (TM) December 2021
Qpcode : D1-S2-Q5
1. Write a shell script to set all permission to user and execute permission only to group and
others for all files in the current directory
2. Write php code getting marks of six subjects (out of 100 marks) of a student and display
the grade
Less than 40 % Failed
<50% Grade D
<60% Grade C
<70% Grade B
<80% Grade B+
<90% Grade A
Above 90% Grade A+