I see what you are trying to do and I have it working like this.
<?
$link = mysql_connect("localhost", "user", "pass");
mysql_select_db("database", $link);
$name = mysql_query("SELECT name FROM member WHERE name = '$logon' AND password = PASSWORD('$password')", $link);
$num_rows = mysql_num_rows($name);
if ($num_rows <= 0)
{
echo "<p align= center>You have entered a wrong user name or password.<br></p>";
echo "<div align=center>please try again.";
exit;
}
$selectrecord = ("SELECT name, password, email, joined,
icq_number, location, website, interests, msnname, last_post,
allow_post, bday_day, bday_month, bday_year, cookie,
last_visit, last_active FROM member WHERE name = '$logon' AND
password = PASSWORD('$password')");
$result = mysql_query($selectrecord, $link) or die ("Query failed");
$num_rows = mysql_num_rows($result);
while ($row = mysql_fetch_object($result)){
$name = $row->name;
$password = $row->password;
$email = $row->email;
$icq_number = $row->icq_number;
$location = $row->location;
$website = $row->website;
$interests = $row->interests;
$msnname = $row->msnname;
$bday_day = $row->bday_day;
$bday_month = $row->bday_month;
$bday_year = $row->bday_year;
?>
Now in the same .php page I do this....I think it keeps the coding cleaner and easier to read. not sure if yo can do this with your information.
<form action="registersubmit.php" method="post" name="Logon" id="Logon" >
<table width="50%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#003366"><font color="#FFFFFF">Logon:</font></td>
<td><input name="logon" type="text" id="logon" value=<? echo "$name"; ?>></td>
</tr>
<tr>
<td bgcolor="#003366"><font color="#FFFFFF">Email:</font></td>
<td><input name="email" type="text" id="email" value=<? echo "$email"; ?>></td>
</tr>
<tr>
<td bgcolor="#003366"><font color="#FFFFFF">ICQ:</font></td>
<td><input name="icq_number" type="text" id="icq" value=<? echo "$icq_number"; ?>></td>
</tr>
<tr>
<td bgcolor="#003366"><font color="#FFFFFF">Location:</font></td>
<td><input name="location" type="text" id="location" value=<? echo "$location"; ?>></td>
</tr>
<tr>
<td bgcolor="#003366"><font color="#FFFFFF">Website:</font></td>
<td><input name="website" type="text" id="website" value=<? echo "$website"; ?>></td>
</tr>
<tr>
<td bgcolor="#003366"><font color="#FFFFFF">Interest:</font></td>
<td><textarea name="interests" id="interests"><? echo "$interests"; ?></textarea></td>
</tr>
<tr>
<td bgcolor="#003366"><font color="#FFFFFF">MSN Email: </font></td>
<td><input name="msnname" type="text" id="msnname" value=<? echo "$msnname"; ?>></td>
</tr>
<tr>
<td bgcolor="#003366"><font color="#FFFFFF">Day of Birth: <font size="-5">ex
06</font></font></td>
<td><input name="bday_day" type="text" id="bday_day" maxlength="2" value=<? echo "$bday_day"; ?>></td>
</tr>
<tr>
<td bgcolor="#003366"><font color="#FFFFFF">Month of Birth: <font size="-5">ex
06</font></font></td>
<td><input name="bday_month" type="text" id="bday_month" maxlength="2" value=<? echo "$bday_month"; ?>></td>
</tr>
<tr>
<td bgcolor="#003366"><font color="#FFFFFF">Year of Birth: <font size="-5">ex
1972</font></font></td>
<td><input name="bday_year" type="text" id="bday_year" maxlength="4" value=<? echo "$bday_year"; ?>></td>
</tr>
<tr bgcolor="#000000">
<td align="center"><font color="#FFFFFF">
<input type="submit" name="Submit" value="Submit">
</font></td>
<td align="center"><font color="#FFFFFF">
<input type="reset" name="Submit2" value="Reset">
</font></td>
</tr>
</table>
</form>
<? } ?>
Ok not all the above is PHP but you can see where I have the PHP inputed and it is easier for me atleast.
I hope this helps.
I do have a PS. question can I make the LOGON name be unedetable? If so how?