END TERM EXAMINATION
FIFTH SEMESTER (BCA) DECEMBER 2016
Paper Code: BCA-313
Subject: Web Based Programming
Time: 3 Hours
Maximum Marks: 75
Note: Attempt any five questions including Q no.1 which is compulsory.Select one question from each unit.
- Q1. Do the following:- (10x2.5=25)
- (a) How can we encrypt the username and password using PHP? What are the encryption functions in PHP?
- (b) Difference between GET, POST and REQUEST method.
- (c) What is the difference between array_combine and array_merge()?
- (d) What are the different types of errors in PHP?
- (e) Difference between include(), include_once(), require(), require_once() and header('Location:')
- (f) Write a PHP script to send a mail.
- (g) What is maintaining state? How can we create, access and delete a cookie.
- (h) What is Juggling in PHP?
- (i) How to create and read the content of a file in PHP.
- (j) Difference between echo and print == and === in PHP.
UNIT-I
- Q2. (a) What is Web Application? Difference between traditional web Application and AJAX web Application. (6)
- (b) Difference between clients side and Server side Scripting. (6.5)
- Q3. (a) Write down the steps of Installation of Apache, IIS and PWS. (6)
- (b) Differentiate between:-
- (i) Static website and Dynamic Web Site
- (ii) Remote Server and Local Server
- (iii) PHP and JavaScript
UNIT-II
- Q4. (a) What is PHP? Create an associative array using the countries as keys, the cities as values and transform it into 2-dimensional array and display the data as a table. (6)
- (b) Define constant in PHP with example. Explain Variable scope and super global variable in PHP. (6.5)
- Q5. (a) Explain functions in PHP in detail. Write a function to swap two numbers without using third variable. (6)
- (b) What do you mean by management of variables? Explain with the help of suitable example. Write a Menu-Driven program to implement a calculator which performs only addition, subtraction, multiplication and division. The operation should happen based on the user choice. (6.5)
UNIT-III
- Q6. (a) How can we submit a form without a submit button. Design a login form using HTTP authentication. (6)
- (b) Write a Program using PHP to upload a file. (6.5)
- Q7. (a) Write a PHP code to design given Contact us form and provide validation on name, email. (6.5)
- (b) Explain Session and Write a PHP script to count the number of visit of web page by the user using session. (6)
UNIT-IV
- Q8. (a) What is MYSQL? Explain datatypes of MYSQL. Write the various constraints of SQL and write the steps to design a table using PhyMyadmin. (8)
- (b) How to use MYSQL in Clause for string search and number search. (4.5)
- Q9. (a) Write a PHP script to create a database employee and create a employee table with in the database with field name i.e. emp_id, emp_name, emp_salary and emp_designation. Insert a record and select all records of employee table and display in tabular format. (8)
- (b) Difference between mysql-connect and mysql-pconnect. (2)
- (c) In how many ways we can retrieve the data in the result set of MySQL using PHP? (2)