JNTUK Web Technologies Lab - MCA R20

  1. Design the following static web pages required for an online book store web site.

    1. Home Page
    2. Login Page
    3. Registration Page
    4. Catalogue Page
    5. Cart Page
    6. Payment by Credit Cart

    Click Here for Solution

  2. Create and save an XML document on the server, which contains 10 users information. Write a program, which takes User Id as an input and returns the user details by taking the user information from the XML document.

    Click Here for Solution

  3. Write a PHP script to merge two arrays and sort them as numbers in descending order.

    Click Here for Solution

  4. Write a PHP script that reads data from one file and write into another file.

    Click Here for Solution

  5. Write a PHP script to print prime numbers between 1-50.

    Click Here for Solution

  6. Write a PHP script to:

    1. Find the length of string.
    2. Count number of words in a string
    3. Reverse of a string
    4. Search for a specific string

    Click Here for Solution

  7. Write JavaScript to validate the following fields of the registration page.
    1. Name (Name should contains alphabets and the length should not be less than 6 characters).
    2. Password (Password should not be less than 6 characters length).
    3. Confirm password(Password and confirm password should be same).
    4. E-mail id (should not contain any invalid and must follow the standard pattern name@domain.com).
    5. Phone number (Phone number should contain 10 digits only).

    Click Here for Solution

  8. Create a table which should contain at least the following fields: name, password, email-id, phone number(these should hold the data from the registration form). Practice 'JDBC' connectivity. Write a JSP to connect to that database and extract data from the tables and display them. Insert the details of the users who register with the web site, whenever a new user clicks the submit button in the registration page.

    Click Here for Solution

  9. Write a JSP to authenticate the user when he submits the login form using the user name and password from the database. If details are valid display welcome message otherwise display warning message.

    Click Here for Solution

  10. Assume four users user1, user2, user3 and user4 having the passwords pwd1, pwd2, pwd3 and pwd4 respectively. Write a PHP for doing the following.
    1. Create a Cookie and add these four user id’s and passwords to this Cookie.
    2. Read the user id and passwords entered in the Login form (week1) and authenticate with the values (user id and passwords) available in the cookies. If he is a valid user (i.e., user-name and password match) you should welcome him by name (user-name) else you should display "You are not an authenticated user".

    Click Here for Solution

  11. Insert the details of users who register with the web site by using registration form. Authenticate the user when he submits the login form using the user name and password from the database.

    Click Here for Solution

  12. HTTP is a stateless protocol. Session is required to maintain the state.
    Every user will have his own session which will be created after his successful login to the website. When the user logs out his session should get invalidated.

    Click Here for Solution