Well i know the sql is good and the connection and everything is good. I will put code up although due to a non disclosure agreement i can't post much.
Var names have all been changed the structure remains intact -
if ($submit) {
if ($id || $username)
{
if ($username)
{
$sql = "SELECT * FROM user WHERE beamRank=$username";
}
if ($id)
{
$sql = "SELECT * FROM user WHERE id=$id";
}
$result = mysql_query($sql);
$myrow = mysql_fetch_array($result);
?>
<!--Make FORM to print out values for editing-->
<form method="post" action="<?php echo $PHP_SELF ?>">
<table>
<tr>
<td bgcolor="#FFFFCC">
ID#:
</td>
<td bgcolor="#CCFFFF">
<input type="Text" name="idE" value="<?php echo $myrow[id] ?>">
</td>
</tr>
<tr>
<td bgcolor="#CCFFFF">
Username:
</td>
<td bgcolor="#CCFFFF">
<input type="Text" name="usernameE" value="<?php echo $myrow[Uname] ?>">
</td>
</tr>
<tr>
<table>
What i am doing is pulling data based on either a id or username information put in on one form. The data is then filled in on a from that appears and allows for the user to edit it. Then it will eventually be able to update the database.
That is a brief dumbed down version. My table IS populated with correct data and the script works perfect if the integer id field is filled out. However the second you enter the username field it tirds out on me. I know the uname field is there and filled in correctly.
No solutions offered so far have helped - but thanks for the help thus far all
Bipper