--- In [email protected], Dick Russel <[EMAIL PROTECTED]> wrote:

> ### form.php
> <html>
> <head>
>   <title></title>
> </head>
> <body>
> Your Text<br />
> <?php
> 
> echo nl2br(htmlentities($_POST['text']));
> 
> ?>
> </body>
> </html>
> ### form.php ####
>

Ooops..Dick, try to input two slashes \\. I guess you'll get \\\\. 
Won't you? Well, nl2br is just a good addition to my idea, so the 
final variant is

### form.php
<html>
<head>
<title></title>
</head>
<body>
Your Text<br />
<?php

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

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

Magic quotes are disabled by default in PHP. I don't use it - it's 
really bad idea.

Reply via email to