Hello,

I need to retrieve data from mysql table (red one) and insert into dynamic menu link (blue one). I created separated groups for my members and now I need dynamic menu, only one link to be precise, that points to that member group. So how can I retrieve member 'login_redirect' data from mysql and insert it to link.

Can any one help me?

Mysql Data
Code:
--
-- Table structure for table `groups`
--

CREATE TABLE IF NOT EXISTS `groups` (
  `ID` tinyint(3) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  `login_redirect` varchar(255) DEFAULT NULL,
  `logout_redirect` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;

--
-- Dumping data for table `groups`
--

INSERT INTO `groups` (`ID`, `title`, `description`, `login_redirect`, `logout_redirect`) VALUES
(1, 'Admins', 'The admin(s) with full rights', 'admin/admin.php', 'login.php'),
(2, 'Members', 'The default members group', 'members/members.php', 'login.php'),
(3, 'Test', 'test grupa', 'test/', 'login.php');
Menu print
Code:
if ( $login->is_logged_in () )
		{
			if ( $login->isadmin () ) {
				$out .= '<li><a href="' . APPLICATION_URL . 'admin/admin.php" title="Admin">Admin</a></li>'."\n";
			}
	                $out .= '<li><a href="' . APPLICATION_URL . 'members/update_profile.php" title="My Account">My Account</a></li>'."\n";
					$out .= '<li><a href="' . APPLICATION_URL . 'members/members.php" title="Members">Members</a></li>'."\n";
	                $out .= '<li><a href="' . APPLICATION_URL . 'logout.php" title="Logout">Log Out</a></li>'."\n";
					$out .= '<li><a href="' . APPLICATION_URL . 'login_redirect" title="test">test</a></li>'."\n";
	        }
	        else {
	        	$out .= '<li><a href="' . APPLICATION_URL . 'login.php" title="Login">Login</a></li>'."\n";
				$out .= '<li><a href="' . APPLICATION_URL . 'register.php" title="Register">Register</a></li>'."\n";
				$out .= '<li><a href="' . APPLICATION_URL . 'forgot_password.php" title="forgot password">forgot_password</a></li>'."\n";
	        }