Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6778387
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:15:37+00:00 2026-05-26T16:15:37+00:00

i have a script that i have modified to meet my requirements however i

  • 0

i have a script that i have modified to meet my requirements however i now need to send the email to more than one person, could someone point me in the right direction as to how i could modify the script to send to more than one person.

<?php
if(isset($_POST['email'])) {

    // EDIT THE 2 LINES BELOW AS REQUIRED
    $email_to = "emailremoved@sample.com";
    $email_subject = "Kro Catering Website Enquiry";


    function died($error) {
        // your error code can go here
        echo "We are very sorry, but there were error(s) found with the form you submitted. ";
        echo "These errors appear below.<br /><br />";
        echo $error."<br /><br />";
        echo "Please go back and fix these errors.<br /><br />";
        die();
    }

    // validation expected data exists
    if(!isset($_POST['your_name']) ||
        !isset($_POST['type']) ||
        !isset($_POST['guests']) ||
        !isset($_POST['date']) ||
        !isset($_POST['phone']) ||
        !isset($_POST['email'])) {
        died('We are sorry, but there appears to be a problem with the form you submitted.');      
    }

    $your_name = $_POST['your_name']; // required
    $type = $_POST['type']; // required
    $guests = $_POST['guests']; // required
    $date = $_POST['date']; // not required
    $phone = $_POST['phone']; // required
    $email_from = $_POST['email']; // required

    $email_message = "Form details below.\n\n";

    function clean_string($string) {
      $bad = array("content-type","bcc:","to:","cc:","href");
      return str_replace($bad,"",$string);
    }

    $email_message .= "Your Name: ".clean_string($your_name)."\n";
    $email_message .= "Type: ".clean_string($type)."\n";
    $email_message .= "Guests: ".clean_string($guests)."\n";
    $email_message .= "Date: ".clean_string($date)."\n";
    $email_message .= "Phone: ".clean_string($phone)."\n";
    $email_message .= "Email: ".clean_string($email_from)."\n";


// create email headers
$headers = 'From: '.$email_from."\r\n".
'Reply-To: '.$email_from."\r\n" .
'X-Mailer: PHP/' . phpversion();
@mail($email_to, $email_subject, $email_message, $headers); 
?>

<!-- include your own success html here -->

<?php

   header( 'Location: /thanks.aspx' ) ;

?>

<?php
}
?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T16:15:38+00:00Added an answer on May 26, 2026 at 4:15 pm

    Search for the line:

    $email_to = "emailremoved@sample.com";
    

    And keep adding e-mails with a comma separating them:

    $email_to = "emailremoved@sample.com,emailremoved@sample.com,emailremoved@sample.com";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an upload script that write a index.html file, I modified it to
I can't seem to figure this one out. I have a validator-type script that
I have php login script that I have modified with htm tables and css.
I have a series of files that I need to 'cat' whenever a one
I have a script that checks something on my PC every 5 minutes and
I have a script that connects to SQL Server 2005 default instance. But I'm
I have a script that will convert a text file into a resource file,
I have a script that generates DDL scripts to define materialized views for a
I have a script that generates images from text using PHP. It's working fine
I have a script that uses a simple while loop to display a progress

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.