I am trying to send a carraige return (from a text box) to a script. I was able to get the effect I wanted in ASP using the code:
<%
Message = Trim(Request.Form("message"
)
Message = Replace(Message, vbcrlf, "<br>" & vbcrlf)
%>
What this does is replace vbcrlf (the "return" code) with the break tag, as well as vbcrlf. When (return) is pressed, the vbcrlf makes a carraige return in the code sent to the browser, but not in the page displayed.
For PHP, I tried to use the code:
<?php $message = $_POST["message"]; ?>
<?php echo ereg_replace ("vbcrlf", "<br>", $message); ?>
But there were no replacements made.
Does anybody know how to replace the (enter) code with a (br) tag??
Thanks for any input!
Natwod
<%
Message = Trim(Request.Form("message"
Message = Replace(Message, vbcrlf, "<br>" & vbcrlf)
%>
What this does is replace vbcrlf (the "return" code) with the break tag, as well as vbcrlf. When (return) is pressed, the vbcrlf makes a carraige return in the code sent to the browser, but not in the page displayed.
For PHP, I tried to use the code:
<?php $message = $_POST["message"]; ?>
<?php echo ereg_replace ("vbcrlf", "<br>", $message); ?>
But there were no replacements made.
Does anybody know how to replace the (enter) code with a (br) tag??
Thanks for any input!
Natwod