Thread: PHP in a link?
View Single Post
  #6  
Old 01-30-2009, 01:44 PM
BMR777 BMR777 is offline
Member
 
Join Date: Jan 2011
Posts: 1,122
Gender: Male
Credits: 18,076
BMR777 is on a distinguished road
Default RE: PHP in a link?

Ok, try this:

In the template file, just go ahead and remove the My Account link all together.

Then, in each php file find:

PHP Code:
$link2 "";
if(
$show_extra_page2 == "yes"){
$link2 "<li><a href='$extra_page2_link'>$extra_page2_name<span class='tab-l'></span><span class='tab-r'></span></a></li>"

Add Below:

PHP Code:
if($username != ""){

$link3 "<li><a href='viewprofile.php?id=".$username."'>My Account<span class='tab-l'></span><span class='tab-r'></span></a></li>"

That should make it where if the user is logged in a link will appear at the top of the page that says My Account. When they click on it they will be taken to viewprofile.php?id=USERNAME_HERE.

Try this edit on one file and see if it works and if so then apply it to all the PHP files. :)

Brandon
Reply With Quote