PHP Profile Pages

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Paws
Forum Newbie
Posts: 15
Joined: Sun Nov 30, 2008 8:26 am

Re: PHP Profile Pages

Post by Paws »

Cirdan wrote:After you get a list of usernames from the databse, you just loop through the rows that you retrieved and do something like:

echo "<a href='profile.php?user=".$username."'>" .$username."</a>"

which would turn into

<a href='profile.php?user=CoolDude101'>CoolDude101</a>
Ok the member list page is

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Profile</title>
</head>
<body>
<?php
include ('database.php');
 
$result = mysql_query("SELECT * FROM `Persons`;") or die(mysql_error());
$num_rows = mysql_num_rows($result);
print "There are $num_rows records.<P>";
print "<table width=200 border=1>\n";
while ($get_info = mysql_fetch_row($result)){ 
print "<tr>\n";
foreach ($get_info as $field) 
print "\t<td><font face=arial size=1/>$field</font></td>\n";
print "</tr>\n";
}
print "</table>\n";
mysql_close($link);
 
?>
</body>
</html>
How can I add that link?
Paws
Forum Newbie
Posts: 15
Joined: Sun Nov 30, 2008 8:26 am

Re: PHP Profile Pages

Post by Paws »

Bump
Post Reply