Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.