Well, I'm a bit confused now since you seem to be saying you want to replace the My Account page with the page above. The My Account page is for editing user-specific settings whereas the page you have here appears to be used to add a user to the friends list of another user.
I think I know what you want to do though and I think I have a better idea of what you are saying. I think what you are saying is when you have an adoptable shown somewhere on the site, how can you have the owner of that adoptable linked in to this page to add another user as a friend? Right?
Take this example: Say we have a page like
this one where you have the adoptable and the owner's name. Now I am assuming that you want to link the owner's name or ID number to the page you have created, right?
Well, in the file show.php we would find:
PHP Code:
if($name != ""){
$article_title = "Profile of ".$name.".";
$article_date = date('Y-m-d');
$article_content = "<img src='".$imageurl."' border='0'><br><br>
<b>".$name."'s Level: </b>".$currentlevel."<br>
<b>Total Clicks: </b>".$totalclicks."<br>
<b>".$name." is owned by:</b> ".$owner."<br><br>
Like ".$name."? <b><a href='levelup.php?id=".$id."'>Click Here to level them up!</a></b>";
}
That code outputs the user's adoptable so anyone can view it. Now, for the line:
PHP Code:
<b>".$name." is owned by:</b> ".$owner."<br><br>
Change To:
PHP Code:
<b>".$name." is owned by:</b> <a href='yourpage.php?id=".$owner."'>".$owner."</a><br><br>
That makes a clickable link to the page you created. When a user clicks on the user's name then it will show their profile page that you created, well almost...
In your file, change:
PHP Code:
$query = "SELECT * FROM users WHERE uid = '$id'";
to
PHP Code:
$query = "SELECT * FROM users WHERE username = '$id'";
You could add an extra step in the show.php to convert the username to an ID number, but I don't think this is necessary.
Really, how you link a user's username to your show profile page depends on the file you want to link from. I hope this has helped some and feel free to let me know if you have any questions.
Brandon