CoreyR Posted March 11, 2007 Share Posted March 11, 2007 I have a small database with the following fields. First Name Last Name Address City State Zip For some reason, when I run my edit_client.php it only displays the numbers in the address field. The address in the database is 1658 Tamarisk Ln. The PHP file only shows 1658. I know there is something with the sting 'address' but not sure what I need to do. Here is my PHP. <? $data = mysql_query("SELECT * FROM clients WHERE id='$clientid'") or die(mysql_error()); while($info = mysql_fetch_array( $data )) { Print "<font size=4>Editing Client "; Print "".$info['lname'].""; Print "</font>"; Print "<br><br>"; Print $fname; Print" <form action=client_add.php method=POST> First Name<br> <input type=text name=fname value=".$info['fname']." size=40><br><br> Last Name<br> <input type=text name=lname value=".$info['lname']." size=40><br><br> Address<br> <input type=text name=address value=".$info['address']." size=40><br><br> City<br> <input type=text name=city value=".$info['city']." size=40><br><br> State<br> <input type=text name=state value=".$info['state']." size=40><br><br> Zip Code<br> <input type=text name=zip value=".$info['zip']." size=40><br><br> Client Email Address<br> <input type=text name=email value=".$info['email']." size=40><br><br> Client Notes<br> <textarea cols=30 rows=4 name=notes value=".$info['notes']."></textarea><br><br> <input type=submit value=Send> </form>"; } ?> Thanks for the help. Link to comment https://forums.phpfreaks.com/topic/42272-solved-displaying-data/ Share on other sites More sharing options...
trq Posted March 11, 2007 Share Posted March 11, 2007 Your html is invalid. The lines need to look more like.... <input type='text' name='address' value='".$info['address']."' size='40'> Link to comment https://forums.phpfreaks.com/topic/42272-solved-displaying-data/#findComment-205057 Share on other sites More sharing options...
CoreyR Posted March 11, 2007 Author Share Posted March 11, 2007 Perfect! It works, thanks for the help!! Link to comment https://forums.phpfreaks.com/topic/42272-solved-displaying-data/#findComment-205058 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.