Custom Page type and variables In my preprocess_page() function, I'm setting variables based on the user that is logged in.

I created a custom page that is used as a Welcome page with the information about the user that I set in the variables in the preprocess_page() function.

The problem I have is that the page is not allowing me to put the print statements to echo out the variable, i.e.

&lt;h1 style="font-size:18px; padding-bottom:3px;"&gt;&lt;?php print $FirstName. " ".$LastName; ?&gt;&lt;/h1&gt;


It doesn't echo out the variable values. 

Also, I need later to do something based on the value of a variable. I have tried using an if statement like this:

&lt;?php                
  if($designations == 'ABCDE') {
?&gt;                
              &lt;td align="center" style="width: 40px;"&gt;&lt;img src="images/abcde.png" alt=""&gt;&lt;/td&gt;
&lt;/php                  
  } else {
?&gt;
              &lt;td align="center" style="width: 40px;"&gt;&amp;nbsp;&lt;/td&gt;
&lt;?php                
   }


but all it does is print out part of the PHP:

if($designations == 'ABCDE') {
?&gt;
} else {
?&gt;


What am I doing wrong here???

Updated (Added preprocess_page function code):

function mix_and_match_preprocess_page(&amp;$vars) {
  $vars['page_color'] = theme_get_setting('mix_and_match_page_bg');
  if(user_is_logged_in()) { 
    // Get the user's info and assign the values to variables.
    $vars['ParticipantID'] = 1007945;
    $vars['Username'] = 'JOESMITH';
    $vars['Password'] = 'passwd';
    $vars['FirstName'] = 'Joe';
    $vars['MiddleName'] = '';
    $vars['LastName'] = 'Smith';
    $vars['Suffix'] = '';
    $vars['PreferedEmailAddress'] = 'joe_smith@mysite.com';
  } // if($logged_in)  
}


Showing new code and results:
This code:

&lt;h1 style="font-size:18px; padding-bottom:3px;"&gt;&lt;?php print $FirstName. " ".$LastName; ?&gt;&lt;/h1&gt;


produces (When view source):

&lt;h1 style="font-size:18px; padding-bottom:3px;"&gt;&lt;?php print $FirstName. " ".$LastName; ??&gt;&lt;/h1&gt;


this code:

drupal_set_message('I got here');
&lt;?php if($designations == 'ABCDE': ?&gt;                
                  &lt;td align="center" style="width: 40px;"&gt;&lt;img src="images/cic-35x29.png" alt=""&gt;&lt;/td&gt;
drupal_set_message('I got here');
&lt;?php else: ?&gt;
                  &lt;td align="center" style="width: 40px;"&gt;&amp;nbsp;&lt;/td&gt;
&lt;?php endif; ?&gt;                


produces (When view source):

drupal_set_message('I got here');&lt;br /&gt;
&lt;?php if($designations == 'UACIC'): ??&gt;
&lt;td align="center" style="width: 40px;"&gt;&lt;img src="images/cic-35x29.png" alt="" /&gt;&lt;/td&gt;
&lt;p&gt;drupal_set_message('I got here');&lt;br /&gt;&lt;?php else: ??&gt;&lt;/p&gt;
&lt;td align="center" style="width: 40px;"&gt; &lt;/td&gt;
&lt;p&gt;&lt;?php endif; ??&gt;
Assuming you put the preprocess code in your theme's template.php, coding this inside a node ought to work  - but in order for it to do so you have to 


make sure the Core "PHP Filter" module is enabled and  
make sure the node's Input Format is set to "PHP code."


As I noted, this is not the most secure or maintainable way to do things, but it'll let you do what you want without messing about in page or node templates.