PHP Help, Profile pages?

localhost

BSOD
Messages
72
I am making a site, but anyway I want to use a switch get thing for links, so it will be /members/?userid=$username

I want everywhere that the username is, to link there...I have a somewhat idea how, but it would have to be done by editting the index.php every new member there is...sorry if I can't explain it that well...here is my memberlist.php to give you a better idea of how it's set up:

Code:
<?php

include('../dbconnect.php');

print "<font face=verdana size=2><b><Center>Memberlist</center></b><br><Br><Br>
<b>Username - eMail - Instant Mess. - Join Date - Last Login</b><br>";
$query = "select * from `members` where `username` != 'guest' AND `username` != 'admin';";
$result = mysql_query($query) or die('Query failed: ' . mysql_error() . 'SQL error 1');
while ($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
    $name = $row['username'];
	$email = $row['email'];
	$imess = $row['imess'];
	$date = $row['date'];
	$lastlogin = $row['lastlogin'];
	
	if ($row['lastlogin'] == '00000000') {
		$lastlogin = 'Never';
	}
	
    print "<p><a href=?userid=$name>$name</a> | $email | $imess | $date | $lastlogin</p>";
}
?>
 
Back
Top Bottom