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.
What am i doing wrong??
<?php
session_start();
if(session_is_registered(myusername)){ $html = "<div id=\"welcome_admin\">
<table>
<tr><th>Change your welcome text!</th></tr>
<tr><td><input name=\"welcome_text\" type=\"text\" id=\"welcome_text\"> </td></tr>
<tr><td><input name=\"submit\" type=\"submit\" ></td></tr>
</table></div>"
} else { $html = "<div id=\"welcome\">
<table>
<tr><th>Welcome</th></tr>
<tr><td>Log in to add a welcome text</td></tr>
</table></div>"
}
?>
<html>
<head>
</head>
<body>
<?php print $html; ?>
</body>
</html>
Mark ;
same way for else statement..