The example I have shown below will probably have it stripped. I have set up a phpformgenerator form that accepts recipes... updates a database, and sends an email listing the recipe. Instead of generating an email with say the ingredients in a single column, I get a single block of text with " <br />" between the entries.
Anything I could do to fix this?
Thanks
Rick
Submitted By: XXXX XXXXX
Email Address: XXXXX@XXXXXX.net
Recipe Title: Red Velvet Cake
Recipe Description: The Real Thing!
Category: Cakes, Tortes
Preparation Time:
Serves:
Ingredients: 1/2 cup shortening <br /> 1 1/2 cups sugar <br /> 2 eggs <br /> 1 tsp. vanilla <br /> 1 tsp. butter flavoring <br /> 1 1/2 oz. bottle of red color <br />
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have set up a phpformgenerator form that accepts recipes... updates a database, and sends an email listing the recipe. Instead of generating an email with, say, the ingredients in a single column, I get a single block of text with html tags " <br />" between the entries.
Anything I could do to fix this?
Thanks
Rick
Example:
Submitted By: XXXX XXXXX
Email Address: XXXXX@XXXXXX.net
Recipe Title: Red Velvet Cake
Recipe Description: The Real Thing!
Category: Cakes, Tortes
Preparation Time:
Serves:
Ingredients: 1/2 cup shortening <br /> 1 1/2 cups sugar <br /> 2 eggs <br /> 1 tsp. vanilla <br /> 1 tsp. butter flavoring <br /> 1 1/2 oz. bottle of red color <br />
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The example I have shown below will probably have it stripped. I have set up a phpformgenerator form that accepts recipes... updates a database, and sends an email listing the recipe. Instead of generating an email with say the ingredients in a single column, I get a single block of text with " <br />" between the entries.
Anything I could do to fix this?
Thanks
Rick
Submitted By: XXXX XXXXX
Email Address: XXXXX@XXXXXX.net
Recipe Title: Red Velvet Cake
Recipe Description: The Real Thing!
Category: Cakes, Tortes
Preparation Time:
Serves:
Ingredients: 1/2 cup shortening <br /> 1 1/2 cups sugar <br /> 2 eggs <br /> 1 tsp. vanilla <br /> 1 tsp. butter flavoring <br /> 1 1/2 oz. bottle of red color <br />
I have set up a phpformgenerator form that accepts recipes... updates a database, and sends an email listing the recipe. Instead of generating an email with, say, the ingredients in a single column, I get a single block of text with html tags " <br />" between the entries.
Anything I could do to fix this?
Thanks
Rick
Example:
Submitted By: XXXX XXXXX
Email Address: XXXXX@XXXXXX.net
Recipe Title: Red Velvet Cake
Recipe Description: The Real Thing!
Category: Cakes, Tortes
Preparation Time:
Serves:
Ingredients: 1/2 cup shortening <br /> 1 1/2 cups sugar <br /> 2 eggs <br /> 1 tsp. vanilla <br /> 1 tsp. butter flavoring <br /> 1 1/2 oz. bottle of red color <br />
Here is how I fixed the problem...
In the process.php file, find this line:
$comments=preg_replace("/(\015\012)|(\015)|(\012)/"," <br />", $comments);
Change " <br />" to "\n".
That small change will sufficiently fix the problem of <br /> showing up in your e-mail messages every time there is a carriage return.
This fix will cause problems if you use the data.dat file to store your form entries.
To fix the subsequent problems, find the following in the process.php file:
$make=fopen("admin/data.dat","a");
$to_put="";
$to_put .= date("m.d.Y @H:i"). "|" .$name."|".$phone."|".$email."|".$method."|".$request."|".$comments."
";
I changed it to the following:
$comments2=$comments;
$comments2=preg_replace("/(\n)/"," <br />", $comments2);
$comments2=stripslashes($comments2);
$make=fopen("admin/data.dat","a");
$to_put="";
$to_put .= date("m.d.Y @H:i"). "|" .$name."|".$phone."|".$email."|".$method."|".$request."|".$comments2."
";
The changes effectively "undo" the previous fix, so that the comments will write to the data.dat file correctly.
I hope this helps!!!