You are using a browser which is not compatible with CSS (for more information, see Tara's tutorial). Because of this, it is possible that our website may not appear correctly in your browser. We apologise for the inconvenience, and recommend you upgrade your browser to one which is compatible with CSS. For more information, please visit our Browser Upgrade page.

4WebHelp

Frequently Asked Questions

Home Suggest a Question

Frequently Asked Questions » Freedom2Surf Specific
PHP » How do I keep linebreaks from my form input?
Before you enter the data into the database, display the output etc. add this line to your PHP script:
$string = nl2br($string);
where string is the name of the textarea.

Or when you retrieve the data you could use:
$string = ereg_replace("\n", "<br>", $string);
where string is the data.
This page is © Copyright 2002-2024, 4WebHelp. It may not be reproduced without 4WebHelp's prior permission.