Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>For things like this is it good to have a user table in your DB. Each user will have a specific ID that you can look him/her up by. This ID can be used to track users activities around your website. So for example when your user makes a comment, it is stored in a general comments table with their ID attached to it along with the rest of that comments data (content, time, page etc). When you are loading your avatar page, you perform a lookup on the comments table and search for all comments that user made using there unique ID that way you can link the comments in this table back to the user. Regarding how to make that users comments appear once they click a link, have your view_avatar script accept some POST variables. These are appended to the URL so for example</p> <p><a href="http://www.yourdomain.com/view_avatar.php?id=USERID" rel="nofollow">http://www.yourdomain.com/view_avatar.php?id=USERID</a></p> <p>When the user clicks that link the view_avatar.php script is run and the id parameter is passed along to it. It is accessible from within that script as $_POST['id']; Using this you can then look up that users comments in a specific SQL table. Read throught this documentation to get a better idea of how it all works in PHP,</p> <p><a href="http://php.net/manual/en/reserved.variables.request.php" rel="nofollow">http://php.net/manual/en/reserved.variables.request.php</a></p> <p>Hope that helps :)</p> <hr> <p>edit: sorry gave some bad advise above. the id param will be available as $_GET['id']; see <a href="http://www.w3schools.com/tags/ref_httpmethods.asp" rel="nofollow">this</a> for a good explanation of the difference.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload