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 Link to comment https://forums.phpfreaks.com/topic/214818-textbox-retrieval-from-db/ 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. Link to comment https://forums.phpfreaks.com/topic/214818-textbox-retrieval-from-db/#findComment-1117534 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>"; Link to comment https://forums.phpfreaks.com/topic/214818-textbox-retrieval-from-db/#findComment-1117537 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? Link to comment https://forums.phpfreaks.com/topic/214818-textbox-retrieval-from-db/#findComment-1117889 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 Link to comment https://forums.phpfreaks.com/topic/214818-textbox-retrieval-from-db/#findComment-1117895 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.