ExamVeda
Login
Home
This question belongs to PHP HTML Forms Handling
HTML Forms Handling
?

What will be the output of the following PHP code? Say your previous session username was nachi.
<?php
unset($_SESSION['username']);
printf("Username now set to: %s", $_SESSION['username']);
?>

Answer & Solution
Correct Answer: Option C
To delete the session variable ‘username’ we use the unset() function.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.