Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 01-29-2009, 02:34 PM
BMR777 BMR777 is offline
Member
 
Join Date: Jan 2011
Posts: 1,122
Gender: Male
Credits: 18,784
BMR777 is on a distinguished road
Default RE: PHP in a link?

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
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Link Dots voni Questions and Supports 6 05-13-2014 10:20 AM
Link MaximumRide Questions and Supports 6 04-23-2012 04:52 PM
Getting my forums to link as a sub? Aasixx Questions and Supports 4 04-20-2012 04:20 AM
how change this link ? :( kratosvr Questions and Supports 5 08-24-2011 09:09 AM
Forums Link Ashje Questions and Supports 2 01-24-2009 12:28 AM


All times are GMT -5. The time now is 06:08 AM.

Currently Active Users: 5868 (0 members and 5868 guests)
Threads: 4,081, Posts: 32,043, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636