Web Technology Question
Web Technology Question
Damauli, Tanahun 7. What is the purpose of the action attribute in an HTML form?
Pre Board Examination -2080
Course No.: ICT Ed. 437 Semester: III F.M.: 40 A. It defines the method used to submit the form data.
Course Title: Web Technology Time: 3 hr P.M.: 20 B. It specifies the URL where the form data will be sent.
Name: _________________________________________ Roll No: _______ C. It sets the background color of the form.
Attempt all the questions.
D. It defines the input fields in the form.
Group A [10*1=10]
1. What does PHP stand for?
A. Personal Hypertext Processor 8. Which of the following is true about the mysqli_query() function in PHP?
B. Preprocessed Hypertext Pages A. It executes a SQL query on a database.
C. PHP: Hypertext Preprocessor B. It fetches data from a database.
D. Private Home Page C. It updates the database structure.
D. It creates a new database.
2. PHP code is enclosed in which of the following delimiters?
A. <?php ?> B. {{ }} C. <% %> D. @@ @@ 9. How are sessions different from cookies in PHP?
A. Sessions are stored on the client-side, while cookies are stored on the server-side.
3. Which of the following is a valid PHP variable name? B. Sessions are temporary and expire when the browser is closed, while cookies can
A. $1name B. $_name C. $name-1 D. $name_1 have an expiration time set by the developer.
C. Cookies are more secure than sessions.
4. How is form data sent to the server using the POST method? D. Sessions can only store numeric data, while cookies can store any type of data.
A. As URL parameters B. Appended to the URL
C. In the request body D. As cookies 10. What is the primary purpose of PHP in web development?
A. Styling web pages
5. What does CRUD stand for in the context of database operations? B. Handling client-side scripting
A. Create, Read, Update, Delete C. Generating dynamic content on web pages
B. Copy, Remove, Update, Delete D. Managing browser behavior
C. Compile, Run, Update, Debug
D. Collect, Retrieve, Utilize, Discard
Attempt all questions. Candidates are requested to give their answers practicable as far as Attempt all questions. Candidates are requested to give their answers practicable as far as
possible. possible.
Attempt 6 questions. Attempt 6 questions.
Group B [6*5=30] Group B [6*5=30]
1) Differentiate between GET and POST with example and use case? 1) Differentiate between GET and POST with example and use case?
2) Describe how to read data from a CSV file in PHP and display its content as an HTML 2) Describe how to read data from a CSV file in PHP and display its content as an HTML
table. Provide a sample PHP code for achieving this. table. Provide a sample PHP code for achieving this.
3) Discuss the usage of session and cookie variables in PHP. Explain how these 3) Discuss the usage of session and cookie variables in PHP. Explain how these
mechanisms can be used to remember web users across different pages and sessions. mechanisms can be used to remember web users across different pages and sessions.
4) Differentiate between mysql_fetch_row() and mysql_fetch_array()? 4) Differentiate between mysql_fetch_row() and mysql_fetch_array()?
5) Write down a php code to get data from database School with table Teacher having 5) Write down a php code to get data from database School with table Teacher having
column id,name,age,gender,join_date and display in table? Also get the teachers who column id,name,age,gender,join_date and display in table? Also get the teachers who
are male. are male.
6) Explain the CRUD operations in the context of a database. Provide examples for each 6) Explain the CRUD operations in the context of a database. Provide examples for each
operation: Create, Retrieve, Update, and Delete. operation: Create, Retrieve, Update, and Delete.
7) Design table in HTML with a bit of CSS? Create button with hover effect too which 7) Design table in HTML with a bit of CSS? Create button with hover effect too which
displays a alert when clicked? displays a alert when clicked?
Note: Cellular devices/ Mobiles Phones and Wallet are strictly prohibited inside the Note: Cellular devices/ Mobiles Phones and Wallet are strictly prohibited inside the
Examination Hall. If found, will be seized by Authority. Examination Hall. If found, will be seized by Authority.
The End