Skip to content
VUBuddy

CS521 Final Term Current Subjective by MS Team

Web Systems and Technologies PDF 768 KBUpdated 23 Oct 2026
Final term past paper CS521 Final Term Current Subjective by MS Team PDF 768 KB
vubuddy.com
Type
Final term past paper
Course
CS521 Web Systems and Technologies
Size
PDF 768 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 768 KB

You get 3 free files a day on the website. Add the Chrome extension for 30 a day.

Unlimited downloads in the Android app Get it free on Google Play

Preview text

Text from pages 1, 2, 3 of 20. Download the file for all 20 pages.

CS521 - Short Questions & Answers

1. Update SQL Query

UPDATE Categories SET CategoryName = ' Web' WHERE CategoryName = ' Business';

  1. Reference: Week 11, Topic 91

2. PHP Methods for:

o Removing session variable:

session_unset(); // removes all session variables

o Destroying session:

session_destroy(); // ends the session

  1. Reference: Week 13, Topic 114

3. Using $_FILES in PHP

PHP uses the $_FILES array to handle file uploads. Key steps:

o HTML form should use: enctype="multipart/form-data" o Use $_FILES['fileInputName']['name'], ['type'], ['tmp_name'], ['error'], ['size'] for file details o Example:

if ($_FILES['myFile']['error'] == UPLOAD_ERR_OK) {

move_uploaded_file($_FILES['myFile']['tmp_name' ], 'uploads/' . $_FILES['myFile']['name']);

4. Benefits of AJAX

o Asynchronous communication with server o Reduces page reloads o Improves user experience o Allows partial page updates

5. What are sockets and how they differ from traditional HTML communication

o Socket: Enables full-duplex communication between browser and server.

o Difference:

 Traditional HTTP: request-response model  Web Sockets: real-time, bi-directional communication

6. Different Types of Form Validation

o Client-side (JavaScript):

 Input format, required fields, data type checks

o Server-side (PHP):

 Required info, correct data type, range check, regex

o Using PHP filters

filter_var($email, FILTER_VALIDATE_EMAIL);

  1. Reference: Week 12, Topics 107–108

1. Benefits of using Transactions (with Example)

o Benefits:  Ensures data integrity  Allows rollback if an error occurs  Multiple queries act as one atomic operation o Example:

$pdo->beginTransaction(); $pdo->query("INSERT INTO Categories (CategoryName) VALUES (' Philosophy')"); $pdo->query("INSERT INTO Categories (CategoryName) VALUES (' Art')"); $pdo->commit();

If error occurs, use $pdo->rollback();

2. Syntax to Define Array in PHP + Types of Arrays

o Indexed Array:

$colors = array(" Red", " Green", " Blue");

o Associative Array:

$ages = array(" Peter"=>35, " John"=>40);

o Multidimensional Array:

$students = array( array(" Ali", 20), array(" Sara", 22)

  1. Reference: Week 9, Topic 78
All CS521 files →
CS521 Web Systems and Technologies All CS521 handouts, past papers, quizzes and MCQs in one place. Open course page

Get more out of VUBuddy, for free

Android app Free on Google Play
  • Unlimited downloads
  • The explanation behind every MCQ answer
  • Study offline on slow data
Get the Android app
Chrome extension Free on the Chrome Web Store
  • 30 downloads a day instead of 3
  • Sign in and buy Pro Semester here
Add to Chrome

One Pro Semester membership works in both the extension and the app.