Unit One: Web Document Requiring Server-Side Dynamic
Interaction
Dynamic Functionality of a Website
1. What is the difference between a static website and a dynamic website?
2. Name three categories of dynamic websites and provide an example for each.
3. Explain the purpose of an affiliate website.
4. How does a community website differ from a social networking website?
5. What is the primary function of a search website?
6. Why is a blog considered a dynamic website?
7. How does a dating website utilize dynamic functionality?
8. What is the role of a news website in providing dynamic content?
9. Explain how a gambling website uses dynamic features.
10. What is the purpose of a company website in terms of dynamic functionality?
Web Scripting Language
11. What is a scripting language, and how does it differ from a programming
language?
12. Name three server-side scripting languages and three client-side scripting
languages.
13. Why is JavaScript considered a client-side scripting language?
14. What are the advantages of using Python as a scripting language?
15. Explain the role of PHP in web development.
16. What is the difference between server-side and client-side scripting?
17. Why is JavaScript used in 98% of websites?
18. What are the disadvantages of using scripting languages?
19. How does Ruby differ from other scripting languages like PHP or Python?
20. What is the significance of Perl in web development?
Web Document Requirements
21. What is the purpose of a website requirements document?
22. List the five key points to include in a website requirements document.
23. Why is it important to define the target audience for a website?
24. What are the technical requirements to consider when designing a website?
25. How do wireframes and site maps contribute to the website design process?
26. What are the common goals of a business website?
27. How does defining content requirements help in website development?
28. What is the role of site accessibility in technical requirements?
29. Why is it important to include interactive elements in a website?
30. How does a website's purpose influence its design and functionality?
Unit Two: Server-Side Scripts
Development Environment
31. What is XAMPP, and why is it used in PHP development?
32. Explain the role of Apache in a PHP development environment.
33. What is the purpose of MySQL in web development?
34. How do you configure XAMPP for PHP development on Windows?
35. What are the core components of XAMPP, and what do they do?
Basic Syntax of Server-Side Scripts
36. What is the basic syntax of a PHP script?
37. How do you declare a variable in PHP, and what are the rules for variable names?
38. What are the different data types supported by PHP?
39. Explain the difference between scalar and compound data types in PHP.
40. What are PHP operators, and how are they categorized?
41. How do you use conditional statements in PHP?
42. What is the difference between a while loop and a for loop in PHP?
43. How do you use the switch statement in PHP?
44. What is the purpose of the break and continue statements in PHP?
45. How do you write single-line and multi-line comments in PHP?
Forms and User Input
46. What is the difference between the GET and POST methods in form submission?
47. How do you access form data in PHP using $_GET and $_POST?
48. Write a simple PHP script to handle a form submission using the POST method.
49. Why is the POST method more secure than the GET method?
50. What are the key attributes of an HTML form element?
Working with Database
51. What is MySQL, and why is it widely used in web development?
52. What are the three methods to connect PHP to a MySQL database?
53. Why is the mysql() function no longer recommended for database connections?
54. What is the difference between MySQLi and PDO in PHP?
55. How do you connect to a MySQL database using MySQLi in PHP?
56. What is phpMyAdmin, and what are its key features?
57. How do you execute a SQL query in PHP using MySQLi?
58. What is the role of primary and foreign keys in a MySQL database?
59. How do you handle errors in MySQLi database connections?
60. What are the advantages of using PDO over MySQLi?
Security Features in Web Development
61. What is a registry lock, and why is it important for website security?
62. How does hotlink protection prevent data theft?
63. What is the purpose of a spam stop feature on a website?
64. How does DDoS protection help secure a website?
65. What is SSL, and how does it protect website communication?
66. Why is two-step verification important for website security?
67. What are the characteristics of a strong administrative password?
68. How does bot blocking improve website security?
69. What is cross-site scripting (XSS), and how can it be prevented?
70. Why is data backup essential for website security?
Bonus Questions (General)
71. What is the difference between PHP and JavaScript in terms of execution?
72. Why is PHP considered a server-side scripting language?
73. How does JavaScript enhance the functionality of a website?
74. What are the key differences between server-side and client-side scripting?
75. How do scripting languages contribute to the dynamic functionality of a website?
76. What are the advantages of using open-source scripting languages like PHP and
Python?
77. How does a dynamic website improve user experience compared to a static
website?
78. What are the key considerations when choosing a scripting language for web
development?
79. How does MySQL contribute to the functionality of a dynamic website?
80. What are the best practices for securing a website against common
vulnerabilities?
These questions cover a wide range of topics from both units and should help you
prepare thoroughly for your exam. Good luck!
2/2
give me the answer
Here are the answers to the 40 questions provided earlier, organized by unit and
topic:
Unit One: Web Document Requiring Server-Side Dynamic
Interaction
Dynamic Functionality of a Website
1. Static websites display the same content to all users, while dynamic
websites change content based on user interactions or data.
2. Examples:
o Activity: Meetup.com (users find others with common interests).
o Affiliate: Amazon Associates (sells products for ad revenue).
o Archive: Internet Archive (stores searchable data like documents).
3. An affiliate website promotes or sells someone else's products/services to
generate advertising revenue.
4. A community website focuses on shared interests and discussions, while
a social networking website is for personal connections and communication.
5. A search website aggregates and presents information based on user queries
(e.g., Google).
6. A blog is dynamic because it allows users to post and update content in real-
time.
7. A dating website uses dynamic features to match users based on preferences
and interactions.
8. A news website provides real-time updates and personalized content based on
user interests.
9. A gambling website uses dynamic features to update odds, process bets, and
display results in real-time.
10. A company website provides dynamic information about products, services,
and corporate updates to customers and investors.
Web Scripting Language
11. A scripting language is a programming language used to automate tasks, often
interpreted at runtime. Unlike traditional programming languages, scripting
languages are typically easier to learn and use.
12. Server-side: PHP, Python, Node.js. Client-side: JavaScript, HTML, CSS.
13. JavaScript runs in the user's browser, making it a client-side scripting language.
14. Python is easy to learn, has concise syntax, and supports functional and object-
oriented programming.
15. PHP is a server-side scripting language used to create dynamic web pages and
interact with databases.
16. Server-side scripting runs on the server (e.g., PHP), while client-side
scripting runs in the browser (e.g., JavaScript).
17. JavaScript is used in 98% of websites because it enhances interactivity and
functionality on the client side.
18. Disadvantages include slower execution, lack of optimizations, and the need for
regular updates.
19. Ruby is known for its flexibility and clean syntax, making it easier to learn and
use compared to PHP or Python.
20. Perl is known for its text manipulation capabilities and was widely used for CGI
scripting in the 1990s.
Web Document Requirements
21. A website requirements document outlines the needs of a new website,
providing a roadmap for designers and developers.
22. The five key points are:
Purpose and goals.
Target audience.
Technical requirements.
Content requirements.
Wireframes and site maps.
23. Defining the target audience helps tailor the website's design, content, and
functionality to meet user needs.
24. Technical requirements include functionality, accessibility, integrations, site
search, analytics, and site styles.
25. Wireframes and site maps provide a visual representation of the website's
structure and layout.
26. Common goals include educating customers, encouraging contact, building brand
credibility, and generating sales.
27. Defining content requirements ensures the website has the necessary pages,
text, images, and interactive elements.
28. Site accessibility ensures the website is usable by all users, including those
with disabilities.
29. Interactive elements (e.g., forms, buttons) enhance user engagement and
functionality.
30. The website's purpose influences its design, content, and features to achieve
specific goals (e.g., sales, information sharing).
Unit Two: Server-Side Scripts
Development Environment
31. XAMPP is a free, open-source software package that provides a local server
environment for PHP development.
32. Apache is a web server that processes PHP scripts and sends the results to the
user's browser.
33. MySQL is a relational database management system used to store, retrieve, and
manipulate data in web applications.
34. To configure XAMPP:
Install XAMPP.
Start Apache and MySQL from the XAMPP Control Panel.
Place PHP files in the htdocs folder.
35. Core components of XAMPP include Apache (web server), MySQL (database),
and PHP (scripting language).
Basic Syntax of Server-Side Scripts
36. A PHP script starts with <?php and ends with ?>.
37. Variables are declared with a $ sign (e.g., $name = "John";). Rules:
Must start with a letter or underscore.
Cannot start with a number or special symbol.
Case-sensitive.
38. PHP supports scalar (boolean, integer, float, string), compound (array, object),
and special (resource, NULL) data types.
39. Scalar types hold single values, while compound types hold multiple values
(e.g., arrays, objects).
40. PHP operators are categorized into arithmetic, logical, comparison, conditional,
assignment, array, increment/decrement, and string operators.
Forms and User Input
46. GET sends data via the URL, while POST sends data in the request body, making
it more secure.
47. Use $_GET or $_POST to access form data (e.g., $name = $_POST["name"];).
48. Example:
php
Copy
<form action="welcome.php" method="post">
Name: <input type="text" name="name">
<input type="submit" value="Submit">
</form>
php
Copy
<?php
$name = $_POST["name"];
echo "Welcome, $name";
?>
49. POST is more secure because data is not visible in the URL.
50. Key attributes of an HTML form are action (URL to process the form)
and method (GET or POST).
Working with Database
51. MySQL is an open-source relational database management system used to store
and manage data in web applications.
52. The three methods are MySQL, MySQLi, and PDO.
53. The mysql() function is obsolete due to security vulnerabilities like SQL injection.
54. MySQLi is specific to MySQL, while PDO supports multiple databases.
55. Example:
php
Copy
$conn = new mysqli("localhost", "user", "password", "database");
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
56. phpMyAdmin is a web-based tool for managing MySQL databases, allowing
tasks like creating tables and running queries.
57. Example:
php
Copy
$sql = "SELECT * FROM users";
$result = $conn->query($sql);
58. Primary keys uniquely identify rows in a table, while foreign keys establish
relationships between tables.
59. Use $conn->connect_error to handle errors in MySQLi connections.
60. PDO is more flexible and supports multiple databases, making code portable.
Security Features in Web Development
61. A registry lock prevents unauthorized changes to domain configurations,
requiring multiple approvals.
62. Hotlink protection prevents other sites from stealing your images or data by
blocking external access.
63. A spam stop feature blocks unwanted ads and pop-ups, improving user
experience.
64. DDoS protection prevents distributed denial-of-service attacks that overload a
website.
65. SSL encrypts data between users and servers, ensuring secure communication.
66. Two-step verification adds an extra layer of security by requiring two
authentication factors.
67. A strong password is long, complex, and not based on personal information.
68. Bot blocking prevents malicious bots from accessing your site, reducing spam
and attacks.
69. XSS attacks inject malicious scripts into websites. Prevention includes input
validation and output encoding.
70. Data backup ensures data recovery in case of breaches or loss, minimizing
downtime.