I have a form with a textarea that lets people enter multiple lines. The value of the string is passed to the action script as a hidden input, named "instructions." The action script picks it up as $_REQUEST['instructions'].
I have this same code running on two domains, that are hosted on different servers, and I'm seeing a different behavior for each domain.
On the first domain, selecting the Enter key after entering each line in the form textarea generates %D%A while the other domain generates %A.
The second difference is with the behavior of $_REQUEST['instructions'] . Displaying the entire $_REQUEST array at the beginning of the action script with print_r shows a line feed after each line of the instructions parameter for both domains, but if I pull the instructions parameter out with
$instructions = $_REQUEST['instructions']
the first domain puts the %A into $instructions and the other domain leaves it out entirely, so that all the lines that were entered become one line. This is not good since I need to know in the action script how many lines were entered in the form. If I change the second domain code to be
$instructions = urlencode($_REQUEST['instructions']
then I get the %D%A in $instructions and I'm ok.
What am I fighting here? Why does one domain insert %D%A for "Enter" while the other inserts just %A. And why does
preserve the CRLF characters in one case and throw them out in the other?
Thanks for any input.