// Check and see if the user is logged in if( user is logged in ) { echo "<APPLET .... nickname =\"$some_var_representing_user_name\">"; } // end if