Hi
How do I strip the </ br> from the database when a carriage return is entered into the text area by a user?
I get something like this:
hello<br />
<br />
hello<br />
<br />
hello
In addition when using the php mail() function, the text area also stores the </ br> and shows it back to the user in their email: This is the rqst_content field.
if (isset($_POST['submit']))
{
$rqst_name = mysqli_real_escape_string($dbc, trim($_POST['rqst_name']));
$rqst_email = mysqli_real_escape_string($dbc, trim($_POST['rqst_email']));
$rqst_number = mysqli_real_escape_string($dbc, trim($_POST['rqst_number']));
$rqst_content = nl2br(trim($_POST['rqst_content']));
$rqst_survey = mysqli_real_escape_string($dbc, trim($_POST['rqst_survey']));
$http_referrer = getenv( "HTTP_REFERER" );
//send email
//$to = 'liz.banbury@gmail.com';
$to = $rqst_email.',enquiries@bright-tutors.com,liz.banbury@gmail.com';
$subject = 'Bright-Tutors - General Enquiry';
$msg = "$rqst_name has contacted Bright-Tutors.\n" .
"This message was sent from:\n" .
"$http_referrer\n" .
"------------------------------------------------------------\n" .
"Contact Email Address: $rqst_email \n" .
"------------------------------------------------------------\n" .
"Contact Number: $rqst_number \n" .
"------------------------------------------------------------\n" .
"How Did You Hear About Us?: $rqst_survey \n" .
"------------------------------------------------------------\n" .
"Comments: $rqst_content" ;
$headers = "From: admin@bright-tutors.com" ;
mail($to, $subject, $msg, $headers);
Any help would be much appreciated.
THanks you