thebigchief Posted September 30, 2010 Share Posted September 30, 2010 I have a problem where I am unable to display a DB entry that for exampe says "John Doe". The code I am using is: <tr> <td>Agent Full Name:</td> <td><input type="text" name="fullname" value='.$agentdata['fullname'].'></td> </tr> The output shows "John" instead of "John Doe", have I missed something here Quote Link to comment Share on other sites More sharing options...
the182guy Posted September 30, 2010 Share Posted September 30, 2010 Are you sure the field contains John Doe? Post the code that performs the query and subsequent processing. Quote Link to comment Share on other sites More sharing options...
thebigchief Posted September 30, 2010 Author Share Posted September 30, 2010 yeah the DB entry is "John Doe" the rest of the stuff is: $agentdata = mysql_fetch_array($user); $id = $_GET[id]; $user = mysql_query("SELECT * FROM users WHERE id='".$id."'"); Its funny though because if I display the echo just as html and not in a textbox it shows the lot using the code: echo "<td".$rowclass.">"; echo $row['fullname']; echo "</td>"; Quote Link to comment Share on other sites More sharing options...
thebigchief Posted October 1, 2010 Author Share Posted October 1, 2010 Anyone? Surely this is a common problem and Im just being stupid? Quote Link to comment Share on other sites More sharing options...
thebigchief Posted October 1, 2010 Author Share Posted October 1, 2010 Fixed it: <tr> <td>Full Name:</td> <td><input type="text" name="fullname" value="'.$agentdata['fullname'].'"></td> </tr> I was missing a " after value= and before ></td> Knew I was mossing something stupid Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.