mailing a cookie string

From: Date: Wed, 05 Feb 2003 21:48:18 +0000
Subject: mailing a cookie string
Groups: php.general 
Request: Send a blank email to php-general+get-134497@lists.php.net to get a copy of this message
I use the following javascript code to split all elements in a cookie string var mailContent = getCookie('$formname'); if (mailContent != null) { var mailData = mailContent.split(/[#]/); var str = '$youhad '+mailData[0]+'$test[12] '+(mailData.length-2); str = str+'<BR>$test[13] '+mailData[1]; for (i = 2; i < mailData.length; i++) { str = str+(i-1)+'. '+mailData[i]; } } and then a hidden field to hold the value of 'str'. Then I read from the hidden field to the mail content and mail it using mail($to,$subject,$body,$from); But obviously the html-part (<BR>) don't work because it all arrives in one long line. I have tried using \n\r instead of <BR> but it result in javascript error. What is the solution to this?

« previous php.general (#134497) next »