Serj I wrote:
> 
> Take It... http://www.sendspace.com/file/a4e701

Almost, your initial html form should be form.php instead of /form.php
to make it more compatible.
You form.php needs to be modified from

htmlentities(stripslashes($_POST['text']))

to

nl2br(htmlentities($_POST['text']))

There is no reason to run stripslashes unless you run magic quotes (bad
idea) and you should also run nl2br.

So the working code is:

#### form.html ######
<html>
<head>
  <title></title>
</head>
<body>
<form action="form.php" method="POST">
<textarea name="text"></textarea>
<input type="submit" value="Go" />
</form>
</body>
</html>
### form.html ###
### form.php
<html>
<head>
  <title></title>
</head>
<body>
Your Text<br />
<?php

echo nl2br(htmlentities($_POST['text']));

?>
</body>
</html>
### form.php ####

Reply via email to