Hi there I've got a form setup to pass variables from flash to a sql table using php, the php sends the varaibles to the table and sends me and the user notification email. Everything works great but in the email I get forward slashes appearing where the line should break, anyone knows how to strip the html tags in php?

Here's the email part of my php script:

<?php

if ($REMOTE_ADDR == "") $ip = "no ip";
else $ip = getHostByAddr($REMOTE_ADDR);

mail("$adminaddress","Info Request",

"A visitor at $sitename has left the following information

name: $name

address: $address

phone: $phone

email: $email

vemail: $vemail

Logged Info :


Using: $HTTP_USER_AGENT

Hostname: $ip

IP address: $REMOTE_ADDR

Date/Time: $date","FROM:$adminaddress");

mail("$email","Video Contest Submission Confirmation",

"Dear $name,

Thank you for your submission.
Upon approval it will be available on $siteaddress
for viewing and voting.

Good Luck,

$sitename

$siteaddress","FROM:$adminaddress");

?>

    What happens if you set the email body to a variable and use it in the mail line instead? I am wondering if that might be causing your problems...

      Try this:

      $search[0]="\\";
      $replace[0]="";
      preg_replace($search,$replace,$mailbody);
       //Where $mailbody is your mail saved as a variable
      
        Write a Reply...