hellonoko Posted April 22, 2007 Share Posted April 22, 2007 My bellow code is causing carriage returns/<br>'s between the end of the form and the last line: echo $row[category]; This also happens if I join the last two lines: echo "</form>" . echo $row[category]; echo "<form id=delete_category name=delete_category method=post action=categories.php>"; echo "<input name=action type=submit value=Delete >"; echo "<input name=id type=hidden value=".$row[id].">"; echo "</form>"; echo $row[category]; Any suggestions? Thanks. Link to comment https://forums.phpfreaks.com/topic/48176-code-inserting-in-output/ Share on other sites More sharing options...
emehrkay Posted April 22, 2007 Share Posted April 22, 2007 is there a br in the code without echoing category? Link to comment https://forums.phpfreaks.com/topic/48176-code-inserting-in-output/#findComment-235504 Share on other sites More sharing options...
hellonoko Posted April 22, 2007 Author Share Posted April 22, 2007 Sometimes. Link to comment https://forums.phpfreaks.com/topic/48176-code-inserting-in-output/#findComment-235505 Share on other sites More sharing options...
trq Posted April 22, 2007 Share Posted April 22, 2007 echo "</form>" . $row['category']; Link to comment https://forums.phpfreaks.com/topic/48176-code-inserting-in-output/#findComment-235533 Share on other sites More sharing options...
hellonoko Posted April 22, 2007 Author Share Posted April 22, 2007 Yea I didn't actually have the second echo in there. Link to comment https://forums.phpfreaks.com/topic/48176-code-inserting-in-output/#findComment-235537 Share on other sites More sharing options...
trq Posted April 22, 2007 Share Posted April 22, 2007 Other than the fact that your html is invalid, I don't see any problems. echo "<form id='delete_category' name='delete_category' method='post' action='categories.php'>"; echo "<input name='action' type='submit' value='Delete'>"; echo "<input name='id' type='hidden' value='".$row[id]."'>"; echo "</form>" . $row[category]; Link to comment https://forums.phpfreaks.com/topic/48176-code-inserting-in-output/#findComment-235550 Share on other sites More sharing options...
hellonoko Posted April 22, 2007 Author Share Posted April 22, 2007 Soft quotes hmm? Ill give it a try. Thanks. Link to comment https://forums.phpfreaks.com/topic/48176-code-inserting-in-output/#findComment-235553 Share on other sites More sharing options...
AndyB Posted April 22, 2007 Share Posted April 22, 2007 By default, the html FORM element has margins added. If you style the form (either in a style file or inline) by adding margin-bottom:0px that 'br' will disappear. For example: echo "<form style='margin-bottom:0px;' ........ Link to comment https://forums.phpfreaks.com/topic/48176-code-inserting-in-output/#findComment-235580 Share on other sites More sharing options...
hellonoko Posted April 22, 2007 Author Share Posted April 22, 2007 Andy: Thanks. Will give that a try. Link to comment https://forums.phpfreaks.com/topic/48176-code-inserting-in-output/#findComment-235583 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.