Topic: Trouble linking to profile.php

I really don't know how to do it.

This is how my code looks like, i use the "cookie online, not online code"

It works fine, but look at the bold text, how do i make that link to the user who is currently online?

code wrote:

<?php
define('PUN_TURN_OFF_MAINT', 1);
define('PUN_QUIET_VISIT', 1);

$pun_root = './forum/';
@include $pun_root.'include/common.php';

// If PUN isn't defined, config.php is missing or corrupt
if (!defined('PUN'))
    exit('config.php doesn\'t exist or is corrupt. Please run install.php to install PunBB first.');
?>
<?php
if ($cookie['is_guest'])
{
   include "loginBoxI.php";
}
else
{
   echo 'Welcome to my site '.pun_htmlspecialchars($cur_user['username']);

   echo '<a href="http://myforum.com/profile.php?>Your Profile</a>

}
?>

/And also, i love your forum script! It's good and very easy to blend in!

2

Re: Trouble linking to profile.php

$cur_user['id'] ?

Re: Trouble linking to profile.php

Yes. Something like this:

echo '<a href="http://myforum.com/profile.php?id='.$cur_user['id'].'">Your Profile</a>';

"Programming is like sex: one mistake and you have to support it for the rest of your life."

4

Re: Trouble linking to profile.php

Hehe, there you have it. I didn't give the syntax but I did give the needed variable. smile

5

Re: Trouble linking to profile.php

Is there a simple script to view  a user profile by either $cur_user['id'] or $pun_user['username'] ?

example:
echo '<a href="http://myforum.com/profile.php?id='.$pun_user['username'].'">Your Profile</a>';

will do the same as below:

echo '<a href="http://myforum.com/profile.php?id='.$cur_user['id'].'">Your Profile</a>';