Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Apr 2004
    Posts
    80
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Send Mail Question

    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
    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" );
    ?>

  • #2
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,266
    Thanks
    6
    Thanked 48 Times in 48 Posts
    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

  • #3
    New Coder
    Join Date
    Apr 2004
    Posts
    80
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #4
    New Coder
    Join Date
    Apr 2004
    Location
    NC
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts
    So it would look like:
    PHP Code:
    $message stripslashes($_REQUEST['message']) ; 

  • #5
    New Coder
    Join Date
    Apr 2004
    Posts
    80
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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!

  • #6
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,266
    Thanks
    6
    Thanked 48 Times in 48 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •