Hi

Im new to this so bear with me...

If I have a backend, that allows people to add content to their site, is there a way to allow them to 'paragraph' their text, put in line breaks etc without knowing HTML code? They would be using a form which would include a textarea input...

Appreciate it massively!

Thanks

lworks

Yep, possible. Use nl2br ! Eg.

<?php
print nl2br($_POST['textarea']);
?>
<html>
<body>
<form method=post action=test.php>
<textarea name=textarea cols=20 rows=20></textarea>
<input type=submit name=submit value=submit>
</body>
</html>

Cheers,
Nav

thanks nav! you're the man! second time you've helped me out, appreciate it!

lworks

:) You are welcome!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.