The forums have permanently moved to forum.kirupa.com. This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.


Results 1 to 2 of 2

Thread: Php Emailer

  1. #1

    Php Emailer

    This code works but when i enter data with spaces in the form it does not send. new to php here how do i fix this issue.


    Emailer code
    Code:
    <?php 
    if(isset($_POST['submit'])) { 
    $to = "foxvalleysoccer@gmail.com"; 
    $subject = "Form Tutorial"; 
    $name_field = $_POST['name']; 
    $email_field = $_POST['email']; 
    $postal = $_POST['postal']; 
    $phone = $_POST['phone']; 
    $rooms = $_POST['rooms']; 
    $address = $_POST['address']; 
    
    $body = "From: $name_field\n E-Mail: $email_field\n Message:\n $message \n Postal Code: $postal \n Phone: $phone \n Rooms: $rooms \n Address: $address"; 
      
    echo "Data has been submitted to $to!"; 
    mail($to, $subject, $body); 
    } else { 
    echo "blarg!"; 
    } 
    ?>

  2. #2
    something in the form maybe because there's no error here?
    Post the code of the form.
    the world is getting more complex because people need simple solutions

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012