passing dynamic content
Posted: Thu Mar 31, 2005 11:24 am
I have a page which displays all members with a select link beside all members usernames.if i click on select link beside a member it should display the members details.however when it goes onto next page it says no rows selected.
First page is memberdisplayfname and displays all members with link beside them:
Any help would be grateful
PHENOM | please review Posting Code in the Forums first
First page is memberdisplayfname and displays all members with link beside them:
Code: Select all
<table border="" cellpadding="0" cellspacing="1" style="border-collapse: collapse; border-width: 0" bordercolor="" width="100%" id="AutoNumber6">
<!--DWLayoutTable-->
<tr>
<td width="111" height="44" valign="top"><? echo $row["username"]; ?></td>
<td width="159" valign="top"><? echo $row["lname"]; ?></td>
<td width="124" valign="top"><? echo $row["fname"]; ?></td>
<td width="52" valign="top" bgcolor="#9999FF"><a href= "testlinksession.php?username= ', $row['username'],'">Select</a> </td>
</tr>
Second page is testlinksession and should display the selected members details:
<?
include "db_connection.php";
$connect = db_connect();
//$username = $row['username'];
//$username = $_GET['username'];
if ($connect)
//$_SESSION['username'] = $username;
{
$query = "select * from member Where username = '$username'"; //Selecting all Entries from the database
$result = mysql_query($query,$connect); //Assigns the variable result to the Query Connection
$temp = mysql_fetch_array($result);
if(mysql_num_rows($result)==0)
{
echo"No Rows";
}
while($row = mysql_fetch_assoc($result)) //;
{
?>
<table border="" cellpadding="3" cellspacing="1" style="border-collapse: collapse; border-width: 0" bordercolor="" width="100%" id="AutoNumber6">
<!--DWLayoutTable-->
<tr>
<td width="109" height="27" valign="top"><? echo $row["lname"]; ?></td>
<td width="101" valign="top"><? echo $row["fname"]; ?></td>
<td width="187" valign="top"><? echo $row["street"]; ?></td>
<td width="114" valign="top"><? echo $row["city"]; ?></td>
<td width="116" valign="top"><? echo $row["county"]; ?></td>
<td width="190" valign="top"><? echo $row["email"]; ?>PHENOM | please review Posting Code in the Forums first