I have a tpl.php
page for login form in my drupal site in which have 4 images.
I need to display only one of these 4 images randomly on each page load.
I can easily do this in less than 10 lines of code using the php rand()
function.
But is it advisable to directly use such functions in tpl files. Could this have some sort of security risk?
UPDATE:
The 4 images that I talked about. I have just uploaded them to sites/default/files/images
folder and have included them in tpl file using following code:
<img src="http://mysite.com/sites/default/files/images/image.jpg"/>
I have a feeling that this is unsafe too. Please advise.