I’m very appreciative for the help I have received so far on my first PHP script.
I was wondering if somebody might be able to help me on another stumbling point.
I’m writing an e-card script where somebody fills out this form, and my PHP script sends out an e-card.
The problem is that in the HTML document, there is a text area like this:
<textarea name="message" cols="45" rows="5" wrap="VIRTUAL" id="textarea"></textarea>
Then in the PHP script, the contents that the user has typed in gets requested like this:
$message = $_REQUEST["message"] ;
Then later in the PHP document, it’s placed into this email handler, and the email is sent off.
This all works fine, and the email is sent with the message, so that’s not the problem.
The problem is, if somebody uses any carriage returns in the textarea for their message, the PHP document strips them away.
Is there any way to preserve the carriage returns for the textarea?
Browsing the forums I have seen similar problems, and thought maybe this would work:
$message = htmlentities($_REQUEST["message"]) ;
However, it doesn’t do anything.
Thanks for any help you might be able to give me.
PS, since this e-card script is open to the public, even with people not too familiar with computers, I'm trying to avoid having to tell the useres to enter any codes or special characters on their end of the script.