Jump to content

AP_King7

New Members
  • Posts

    9
  • Joined

  • Last visited

Posts posted by AP_King7

  1. I need all of the information to go into the browser as well.  I have it all set up to echo to the browser and it works perfectly, now I just need to send all of the different arrays in an e-mail message.  How do I echo them to the browser and add them to my message? Also, I am wanting to add more than just meats, I have other variables similar to $aMeat that I want to add in the message, is that possible this way?

  2. For instance how would I put this into $message?

    <?php
      $aMeat = $_POST['tMeat'];
      if(empty($aMeat)) 
      {
        echo("You didn't select any meats.");
      } 
      else
      {
        $N = count($aMeat);
     
        echo("You ordered $N meat(s): ");
        for($i=0; $i < $N; $i++)
        {
          echo($aMeat[$i] . " - ").;
        }
      }
    ?>
    
  3. It did but I have separated the pages and made a confirm button at the bottom of "process.php" that will run "process2.php" which will e-mail the information from "process.php."  However when I use

     $message = include 'process.php';  
    it doesn't put the web page in the e-mail. It just displays "process.php" on top of the "process2.php" page.
  4. I tried to split the code like that and it didn't work.  It just didn't post my second piece of code.  Like I said, this is obviously not anywhere near all of the code.  My code is just for an example for you guys to go off of.  I understand how to send an e-mail with text and have done it successfully in this code.  I can also send a separate page to an e-mail.  But when I try to send the page that the code is within it doesn't send an e-mail at all.  It just displays it at the bottom of the page infinitely.

     

    For instance if I use $message = "Test" it sends fine.

     

    When I use $message = include 'process.php'; it doesn't send a message.  It just displays it infinitely on the web page.  I want to somehow capture the data that process.php is displaying and send it to an email when process.php is ran from the other pages.

     
     

     
     

  5. Thank you.  I was not aware, this is my first post.  Here is a very small portion of one of the pages with forms and the process page the displays the values on /process.php. I want it to send everything that it displays to the email as well when the data is processed.

    <form action="process.php" method="post">
    Number<input type="text" name="tPerson" value="0" maxlength="2" size="1">
     
    <input type="hidden" name="Trad" value="Trad" />
     
    <h4>Choose 2 </h4> 
      <input type="checkbox" name="tMeat[]" value="Hamburgers" /> Hamburgers
     
     
     
    <?php
    echo($_POST['Trad']);
     
    ?> for <?php echo $_POST["tPerson"]; ?>.<h3>
     
     
    <h4>Selection:</h4>
    <p />
    <?php
      $aMeat = $_POST['tMeat'];
      if(empty($aMeat)) 
      {
        echo("You didn't select any meats.");
      } 
      else
      {
        $N = count($aMeat);
     
        echo("You ordered $N meat(s): ");
        for($i=0; $i < $N; $i++)
        {
          echo($aMeat[$i] . " - ");
        }
      }
    ?>
     
    
    $email_to = "email@email.com";
    $email_subject = "Order Confirmation";
    $message = include 'process.php';   
    
    
  6. I have a full working order form in PHP.  I process it and display it with a process page called "process.php."  Whenever this information is displayed on the web page "process.php" I also want it to send me an e-mail with all of the information that it just processed.  i.e. Checked checkboxes, text entered, etc. Whenever I try to send the contents of "process.php" to an email $message = include 'process.php';  the process page just goes through an infinite loop displaying itself over and over again instead of sending itself in an email.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.