Re: [PHP] Problem with comma in mail form

2002-12-26 Thread Paul Roberts
"1LT John W. Holmes" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, December 26, 2002 4:36 PM Subject: Re: [PHP] Problem with comma in mail form Sorted it out with $message = ereg_replace("(\r\n|\n|\r)", "\n", trim( stripslashes( $messag

Re: [PHP] Problem with comma in mail form

2002-12-26 Thread Ben Edwards
Sorted it out with $message = ereg_replace("(\r\n|\n|\r)", "\n", trim( stripslashes( $message) ) ); trim and stripslashes not strictly speaking nessesery. Not 100% sure what happened here but guess \r\n or \r was causing problems. Ben At 11:11 26/12/2002 -0500, 1LT John W. Holmes wrote:

Re: [PHP] Problem with comma in mail form

2002-12-26 Thread 1LT John W. Holmes
> I have actually discovered the problem is in fact that the message gets > truncated after a Carriage Return. > > The even wearder thing is that >$msg = ereg_replace( "\n", "NL", $msg ); > > Douse put NL where the carriage return was but also seems to leave some > kind on new line characte

Re: [PHP] Problem with comma in mail form

2002-12-26 Thread Ben Edwards
I have actually discovered the problem is in fact that the message gets truncated after a Carriage Return. The even wearder thing is that $msg = ereg_replace( "\n", "NL", $msg ); Douse put NL where the carriage return was but also seems to leave some kind on new line character. So when

Re: [PHP] Problem with comma in mail form

2002-12-26 Thread Ben Edwards
Here is the code with suggestion added, message still gets truncated after comma. Ben include( "common.inc" ); $db = open_db(); html_header( "Contact Us" ); if(isset($doit)) { $errors=array(); check_email( $email, $errors ); if(!isset ($message) || $message == '') { array_push

Re: [PHP] Problem with comma in mail form

2002-12-25 Thread Chris Wesley
On Wed, 25 Dec 2002, Ben Edwards wrote: > I have a fairly simple mail form which gets email, subject and message and > posts to itself. > It then use mail() function to send a email. > mail( $admin_email, $subject, $message, "From: $email" ); > Problem is the message gets truncated if there is a c

[PHP] Problem with comma in mail form

2002-12-24 Thread Ben Edwards
I have a fairly simple mail form which gets email, subject and message and posts to itself. Your Email Address: Subject: Message: if(isset($message)) { echo $message; } ?> It then use mail() function to send a email. mail( $admin_email, $subjec