100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.6 TrustPilot
logo-home
Exam (elaborations)

CIST2351 – PHP Programming I (Chapter 11) Exam 2025 || QUESTIONS & ANSWERS || RATED A+

Rating
-
Sold
-
Pages
17
Grade
A+
Uploaded on
11-11-2025
Written in
2025/2026

CIST2351 – PHP Programming I (Chapter 11) Exam 2025 || QUESTIONS & ANSWERS || RATED A+ Description: This CIST2351 PHP Programming I (Chapter 11) file includes top-rated A+ questions and verified answers for the latest 2025 version. Covers PHP scripting, arrays, forms, and web functionality. Ideal for students mastering PHP development fundamentals. Keywords: CIST2351 PHP programming chapter 11 web development PHP arrays forms and functions server scripting coding exam web programming IT course material

Show more Read less
Institution
CIST2351 – PHP Programming
Course
CIST2351 – PHP Programming










Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
CIST2351 – PHP Programming
Course
CIST2351 – PHP Programming

Document information

Uploaded on
November 11, 2025
Number of pages
17
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Content preview

CIST2351 – PHP Programming I (Chapter 11) Exam 2025
|| QUESTIONS & ANSWERS || RATED A+


Description: This CIST2351 PHP Programming I (Chapter
11) file includes top-rated A+ questions and verified
answers for the latest 2025 version. Covers PHP scripting,
arrays, forms, and web functionality. Ideal for students
mastering PHP development fundamentals.


Keywords: CIST2351 PHP programming chapter 11 web
development PHP arrays forms and functions server
scripting coding exam web programming IT course
material
Section 1: Cookies

1. What is a cookie in the context of PHP?
A. A small text file stored on the web server
B. A session variable
C. A small text file stored on the client's computer
D. An encrypted PHP script

2. Which PHP function is used to send a cookie to the client's browser?
A. set_cookie()
B. create_cookie()
C. send_cookie()
D. setcookie()

,3. The setcookie() function must be called...
A. After any output is sent to the browser
B. Before any output is sent to the browser
C. Inside the HTML <head> section
D. It can be called anywhere

4. What is the third parameter of the setcookie() function used for?
A. The cookie's value
B. The cookie's name
C. The cookie's expiration time
D. The path on the server

5. To create a cookie that expires when the user closes their browser, what should the
expiration parameter be set to?
A. 0
B. -1
C. time() + 3600
D. null

6. How do you access a cookie's value from a subsequent page request?
A. $_REQUEST['cookie_name']
B. $_GET['cookie_name']
C. $_POST['cookie_name']
D. $_COOKIE['cookie_name']

7. To delete a cookie, you should...
A. Use the deletecookie() function
B. Set the cookie's value to an empty string
C. Set the cookie's expiration time to a point in the past
D. Use the unset() function on the $_COOKIE array

8. Which of the following is a potential security concern with cookies?
A. They can contain viruses
B. They are stored on the server
C. They can be viewed and modified by the user
D. They consume significant server memory



Section 2: Sessions

, 9. Where is session data stored by default in PHP?
A. In a database on the server
B. In a cookie on the client's machine
C. In temporary files on the server
D. In the browser's local storage

10. Which function must always be called before you can register session variables?
A. start_session()
B. session_start()
C. init_session()
D. session_register()

11. How do you store a value in a session variable?
A. $_SESSION['var_name'] = $value;
B. session_register('var_name', $value);
C. $var_name = session_value($value);
D. set_session('var_name', $value);

12. What is the purpose of the session ID?
A. To encrypt the session data
B. To uniquely identify a user's session on the server
C. To name the session file on the client's computer
D. To set the session's expiration time

13. How is the session ID typically passed between pages?
A. Through the $_GET array
B. Through a cookie or a URL parameter
C. Through the $_POST array
D. Through a hidden form field

14. Which function destroys all data registered to a session?
A. session_destroy()
B. session_end()
C. unset_session()
D. session_unset()

15. To remove a specific variable from the current session, you would use:
A. unset($_SESSION['var_name']);
B. session_unset($_SESSION['var_name']);
$11.99
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
lecStudyNest

Get to know the seller

Seller avatar
lecStudyNest Teachme2-tutor
View profile
Follow You need to be logged in order to follow users or courses
Sold
1
Member since
3 months
Number of followers
0
Documents
186
Last sold
1 month ago

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions