Page 1 of 1

problem with displaying text in textarea

Posted: Thu Mar 08, 2007 3:29 am
by chitrapu
hiiiiiii
i have a textarea that displays some text. when i enter the text in 2 seperate lines and click a button, the text is getting displayed in a single line in another textarea, can u solve my problem please

Posted: Thu Mar 08, 2007 3:35 am
by volka
compare your script with

Code: Select all

<html>
	<head><title>...</title></head>
	<body>
		<form method="post">
			<div>
				<textarea name="i1"></textarea>
				<br />
				<input type="submit" />
			</div>
		</form>
		last input:
		<br />
		<textarea readonly="readonly"><?php if (isset($_POST['i1'])) echo htmlentities($_POST['i1']); ?></textarea>
	</body>
</html>