Im looking to make a members type page that when you click on the member name (coming from an SQL database) it will then go to their page where for now their name will appear. I have it all working except on their page it just outputs all the names from the database. Example:
http://xyzmedia.co.uk/wow/test.php
Code:
Code:
<table width="100%" height="100%" border="0" cellpadding="5" cellspacing="0">
<tr>
<td width="44%" valign="top"><p>Name:</p>
<? mysql_connect("localhost", "admin", "*******") or die(mysql_error());
mysql_select_db("members") or die(mysql_error());
$result = mysql_query("SELECT * FROM members order by name") or die (mysql_error());
while ($row = mysql_fetch_array($result))
{
echo "<a href='?id=" . $row[name] ."'>" . $row[name] ."</a><br />";
}
?>
<p><br />
Add Your Name </p>
<form action="addmember.php" method="post" name="addmember" id="addmember">
<input type="text" id="name" name="name" value="" />
<input name="submit" type="submit" value="Add" />
</form></td>
<td width="56%" valign="top"><? mysql_connect("localhost", "admin", "*******") or die(mysql_error());
mysql_select_db("members") or die(mysql_error());
$result = mysql_query("SELECT * FROM members order by name") or die (mysql_error());
while ($row = mysql_fetch_array($result))
{
echo "" . $row[name] ."";
}
?>
</td>
</tr>
</table>