Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

PHP Forms

edited January 2006 in Vanilla 1.0 Help
I was wondering if any of you guys know the answer to this, its probably simple anyway... I have created a very simple feedback form, using sendmail.php like so:

<? $name = $_REQUEST['name'] ; $message = $_REQUEST['message'] ; $number = $_REQUEST['number'] ; $msg .= "message here.\n"; $msg .= "------ Sender Details ------\n"; $msg .= "Name: $name\n"; $msg .= "Message: $message\n"; $msg .= "Number: $number\n"; $to = "email here"; $subject = "subject"; $mailheaders = "From: someone\n"; mail($to, $subject, $msg, $mailheaders); header( "Location: thankyou.html" ); ?>

I need the form to send data to two email addresses... is there a simple way to modify the code I have used to send to two addresses?


  • edited January 2006
    Try this:

    <? $name = $_REQUEST['name'] ; $message = $_REQUEST['message'] ; $number = $_REQUEST['number'] ; $msg .= "message here\n"; $msg .= "------ Sender Details ------\n"; $msg .= "Name: $name\n"; $msg .= "Message: $message\n"; $msg .= "Number: $number\n"; $to = "email here"; $subject = "subject"; $mailheaders = "From: someonen\n"; <span style="background : #ffffee;">$mailheaders .= "Cc: [email protected]\n";</span> mail($to, $subject, $msg, $mailheaders); header( "Location: thankyou.html" ); ?>

  • It worked, cheers mate!
  • No probs.
This discussion has been closed.