PHP
I've dabbled with PHP in college, using template engines like smarty for college projects. Recently I've been heavily involved in setting up a Drupal based site, which has meant getting back into PHP to make various changes to the source to suit our needs.
Display message based on user login status in Drupal
Recently been doing a bit of work with Drupal. Here's a handy little script which allows you to check if a user is logged in or not, and display the appropriate message.1 <?php 2 global $user; 3 global $base_url; 4 if ($user->uid == 0) {print ("<br /><a href=\"$base_url/user/register\">Register</a> or <a href=\"$base_url/user/login\" >Log in</a> to view SDKs<br />");} 5 ?>





