profile member information display

Discussion in 'PHP' started by tldmic, Feb 9, 2010.

  1. #1
    I want to ask a question,
    say I have things like,
    name, surname, age, profile picture,country,,
    How do I call these from different tables to be displayed in the logged in user?
    I mean I want the user to be able to see his profile info, like facebok, twitter, myspace,etc
    Infact I am creating myself a social network for my friends and myself who are in ditance lands,
    I have got through the stages till creating their profile page,
    please anyone help

    many thanks
     
    tldmic, Feb 9, 2010 IP
  2. systematical

    systematical Peon

    Messages:
    81
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You should probably invest in a PHP/MySQL book as this is a very basic question. You are asking how to I insert stuff into a member profile table, update, and retrieve this information.... Thats the very basics of LAMP applications and this is not the place to ask such a broad question, this is for specific questions...
     
    systematical, Feb 9, 2010 IP
  3. danx10

    danx10 Peon

    Messages:
    1,179
    Likes Received:
    44
    Best Answers:
    2
    Trophy Points:
    0
    #3
    This should get you started, follow this:

    <?php
    
    $id = $_GET['profile_id'];
    
    $query = "SELECT * FROM tablename WHERE id= $id"; 
    	 
    $result = mysql_query($query) or die(mysql_error());
    
    
    while($row = mysql_fetch_array($result)){
    	echo $row['name']."<br />";
    	echo $row['surname']."<br />";
    //etc.
    }
    ?>
    PHP:
     
    danx10, Feb 9, 2010 IP
  4. tldmic

    tldmic Peon

    Messages:
    41
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    thank you guys, finally it worked, I now understand what is going on,
    viron86, was right at first, then all of you guys have been so patiently helping me,
    however,I am still building my webpage, so I will be asking you questions in the future,

    thanks a lot

    One question, if my userid is generated by computer, can I use that to call it into the logged in user,
    can I call it into the other tables using that?

    thanks
    tldmic:)
     
    tldmic, Feb 9, 2010 IP