php creating 2 views (logged_in or not_logged_in), same page
<p>I'm new to php, i know how to do this in ASP.net with user controls but i only need a check for if the user is logged or not and show difrent content.</p>

<p>What am i doing wrong??</p>

<pre><code>&lt;?php
session_start();
if(session_is_registered(myusername)){ $html = "&lt;div id=\"welcome_admin\"&gt;
&lt;table&gt;
    &lt;tr&gt;&lt;th&gt;Change your welcome text!&lt;/th&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td&gt;&lt;input name=\"welcome_text\" type=\"text\" id=\"welcome_text\"&gt;  &lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td&gt;&lt;input name=\"submit\" type=\"submit\" &gt;&lt;/td&gt;&lt;/tr&gt;      
&lt;/table&gt;&lt;/div&gt;"
} else { $html = "&lt;div id=\"welcome\"&gt;
&lt;table&gt;
    &lt;tr&gt;&lt;th&gt;Welcome&lt;/th&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td&gt;Log in to add a welcome text&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;"
}
?&gt;
&lt;html&gt;
&lt;head&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;?php print $html; ?&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
