So suppose I have this piece of code:
<div class="name" id="<?php echo $userId; ?>">
<p>User Name: <?php echo $username; ?></p>
<p>Last Activity: <?php echo getTime($datetime); ?></p>
<p>Date: <?php echo $date; ?></p>
</div>
In this, do I have to write htmlentities
inside the div id attribute too?
For example, like this:
<div class="name" id="<?php echo htmlentities($userId); ?>" >...</div>
Also, do I need to do this:
<p>Last Activity: <?php echo htmlentities(getTime($datetime)); ?></p>
Thanks for the help!
P.S.:datetime is a function that I have created