I'm trying to create a link in the nav menu to allow a user to go strait to their tracker page without having to goto "my account" then click on the track tab. This is what I have so far and it doesn't work. I don't know php but do understand common sense stuff.

<?php
global $user;
header.=t( location:'index.php?q=user/@user/track', array('@user' => $user->uid));
?>

I think you can see what I'm trying to do.

I tried to make that code from other code I found Here and Here

I was thinking of putting this code in a node then linking to that node in the menu.
all help is appreciated and anyone with even a little insight even if it doesn't complete the job is fine it still might help, it doesn't matter how small. again thank you in advanced.

Comments

kenljr’s picture

I found a fix that will work although I know it's probably an ugly way of doing it. Here it is if you have any suggestions please fell free to show me how to clean it up.

<a href="<?php global $user; $tracker.=t('index.php?q=user/@user/track', array('@user' => $user->uid));
print $tracker;

?>">Tracker</a>
kenljr’s picture

I dont know what I was thinking that didn't fix it but I did come up with a better solution now, here it is

<?php 
global $user; $tracker.=t('index.php?q=user/@user/track', array('@user' => $user->uid));
?>
<?php
Header("Location:$tracker");
?>