jmurch Posted February 22, 2008 Share Posted February 22, 2008 I have an issue echoing a value in a text box vs not in a text box. Text box: echo("<div class='leftBold'>Name:</div><div class='rightTined'><input type='text' name='name' size='30' value=$name></div><br>"); No text box echo("<div class='leftBold'>Name:</div><div class='rightTined'>".$name."</div><br>"); The issue is that when the variable $name (joe blow) is echoed no text box it's fine ('joe blow') when it's echoed in a text box it just displays 'joe'. Link to comment https://forums.phpfreaks.com/topic/92506-solved-text-box-vs-no-text-box-content-echo/ Share on other sites More sharing options...
Bauer418 Posted February 22, 2008 Share Posted February 22, 2008 Place quotes around $name, so it should look like echo("<div class='leftBold'>Name:</div><div class='rightTined'><input type='text' name='name' size='30' value=\"$name\"></div>"); Link to comment https://forums.phpfreaks.com/topic/92506-solved-text-box-vs-no-text-box-content-echo/#findComment-473991 Share on other sites More sharing options...
jmurch Posted February 22, 2008 Author Share Posted February 22, 2008 DOH! thanks Link to comment https://forums.phpfreaks.com/topic/92506-solved-text-box-vs-no-text-box-content-echo/#findComment-473993 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.