Posts: 158
Name: cbeaudin
Location: Proud to be Canadian
|
I have a form that asks to enter one or more paragraphs
The problem is when you submit it, if you have a line break, it adds "rn" instead of "/r/n"
I am not cleaning the variable at all... here is a simple version of the script
PHP Code:
if(!isset($_POST[submit])) { echo "<form method='post' action='http://www.cnotecreations.com/webmanager/mairsfamily/index.php'>"; echo "<textarea name='paragraph' rows='7' cols='35' />$getmain3[paragraph]</textarea>";
//$getmain3[paragraph] is defined earlier in the code
echo "<input type='submit' name='submit' value='Submit' />"; echo "</form>"; } else { echo $_POST['paragraph']; }
So for exapmle if i type in the following:
"Line
Beak
Test"
The output ($_POST['paragraph']) is equal to:
"linernbreakrntest" with no slashes
Thanks in advance for any help.
__________________
- cbeaudin
|