Welcome Guest, Not a member yet? Register   Sign In
Please tell me the better way to create a small site
#3

[eluser]jabga[/eluser]
Yes, the menu is static now

Menu.php view is here, I guess my code will be funny for you guys. But please recommend me how to handle menu Big Grin

Code:
echo anchor('main', 'Home page'); ?>
<?php if (!$auth) {echo anchor('user/register', '   Register');} ?>
<?php if (!$auth) {echo anchor('user/login', '   Login');} ?>
<?php if ($auth  and $loggedusername=='jabga') { echo anchor('admin', '   Admin dashboard');} ?>
<?php if ($auth) {echo anchor('user/logout', '   Logout');}
removed <?php ?> tags ***
$auth is session var ( logged or NUL) , $loggedusername is also session var $_POST['username'] came from Login page lol Tongue



I found it http://www.phpeveryday.com/articles/Code...-P230.html, what is your recommendation guys?


Messages In This Thread
Please tell me the better way to create a small site - by El Forum - 12-01-2009, 08:05 AM
Please tell me the better way to create a small site - by El Forum - 12-01-2009, 08:26 AM
Please tell me the better way to create a small site - by El Forum - 12-01-2009, 08:39 AM
Please tell me the better way to create a small site - by El Forum - 12-01-2009, 12:26 PM
Please tell me the better way to create a small site - by El Forum - 12-01-2009, 09:56 PM
Please tell me the better way to create a small site - by El Forum - 12-01-2009, 11:15 PM



Theme © iAndrew 2016 - Forum software by © MyBB