"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
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:
> 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
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
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
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
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
7 matches
Mail list logo