jkSandy Posted March 12, 2012 Share Posted March 12, 2012 I am using input fields to display/change data from a database. So the user can display a record and change a field value then update the DB record. When the DB field contains text such as: “Intro to Logic” only “Intro” displays in the (input) field. If the field contains “Intorto Logic” only “Introto” displays in the (input field). In ohter word it stops at the first space. I am using a variable to place the text into the value attribute of the input field: value=<?php echo $_SESSION[className] ?>. Yet when I put the literal value=“Intro to Logic” it displays the entire phrase – “Intro to Logic”. What am I doing wrong or what am I misunderstanding about input fields. Note: if I display the text outside an input object it displays correctly so information is passing correctly from the database to the web page. Link to comment Share on other sites More sharing options...
eTianbun Posted March 12, 2012 Share Posted March 12, 2012 Is there quotes around the statement of the value attribute? I dont know much about php, but i think quotes are needed.value="<?php echo _SECTION[className]?>" Link to comment Share on other sites More sharing options...
jkSandy Posted March 12, 2012 Author Share Posted March 12, 2012 Thanks for the quick reply and the correct answer I really appreciate it. Link to comment Share on other sites More sharing options...
valiantshady Posted March 12, 2012 Share Posted March 12, 2012 I've not been working with database involvement yet, but that issue could be a FAQ .. so I'm thanking both of you for it honestly Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.