I have a small blog with only a limited number of users. I would like to create a page for all my users to display their information for them. I would like to name the page the same as there ID so for example if bob’s user ID was 5 I would like to have a link on my pages bar that would use some php to take him to the correct page based on his user ID. I tried the following but it didn’t work:
<?php $myID = $userdata; ?>
<?php echo "<li><a href='http://localhost/heidifitness/?page_id="+ myID +"'>Click</a></li>"; ?>
Any help would be much appreciated!
- The topic ‘return current user ID in a link?’ is closed to new replies.