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
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...
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:
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