Jump to content

Dynamic data onto static user profile page


purplemonkeyuk

Recommended Posts

First off I'm new to php still learning and reading as much as I can.

 

The question is in lamen terms how do you insert dynamic content onto a user profile page based on their username.

 

For instance I have a list of search results, each result is displayed is a unique user summary box.

 

A member can click on a users summary box to take them through to that individuals profile page.

 

When you click user number 1's link how can you carry forward user 1's unique ID so that user number 1's content is then displayed on their full profile page?

 

I know it will be simple but I've hunted on google and in books, without knowing the functions to search I'm hitting lots of dead ends

//search_results.php
echo '<a href="profile?id=1">Click for User 1 Profile</a>';

//profile.php
$id = $_GET['id'];
//do something with $id to retrieve user's info

At its simplest.  Lots of checks to do etc...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.