...

View Full Version : Send Mail Question



Ted Varnson
04-08-2004, 07:47 PM
I was wondering if there was a function or command that would stop the following from happening. When a user sends an email through this script I just wrote, the following:


I'm going to run

looks like


I\'m going to run

How can I change this? Here is my php code

<?
$message = $_REQUEST['message'] ;
$subject = $_REQUEST['subject'] ;
$name = $_REQUEST['name'] ;
$email = $_REQUEST['email'] ;

mail( "aaron@aaronortega.com", $subject, $message, "From: $name, $email" );
header( "Location: http://www.aaronortega.com/thankyou.htm" );
?>

Nightfire
04-08-2004, 08:15 PM
Think about what you're wanting to do, then go search in the manual or google,

Problem
Slashes appearing in text

Action to take
Strip slashes

Answer
http://www.php.net/stripslashes

Ted Varnson
04-08-2004, 08:56 PM
Thanks Nightfire! :) I just don't know how to add that in. I'll play with it, but any additional help would be great. I'm fairly new to all this.

Josh_
04-08-2004, 08:57 PM
So it would look like:


$message = stripslashes($_REQUEST['message']) ;

:)

Ted Varnson
04-08-2004, 09:04 PM
Thanks, I had just gotten that and was going to come post my problem was solved, but thanks so much fo rthe confirmation. Thanks for putting up with a PHP novice! :)

Nightfire
04-08-2004, 10:33 PM
The thing about php functions is that most of them are named after what you're wanting to do. Like stripslashes, addslashes, htmlentities, include, etc. Can usually find what you want by using the manual's search engine and using it's technology to find what you're after, always gives a list of functions close to the words you put in :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum