Mailformulier: Difference between revisions

From Edgar BV Wiki
Jump to navigation Jump to search
(New page: <?php if (isset($_POST['send'])) { $to = "info@tripany.com"; $subject = "Contact"; $headers = "From: Iphone widget!"; $name = $_POST['naam']; $company = $_POST['b...)
 
No edit summary
Line 1: Line 1:
<?php
<?php


 
// waar je wilt zenden!
if (isset($_POST['send']))    {
if (isset($_POST['send']))    {
     $to = "info@tripany.com";
     $to = "info@tripany.com";
Line 7: Line 7:
     $headers = "From: Iphone widget!";
     $headers = "From: Iphone widget!";


// opvang van gegevens
     $name = $_POST['naam'];
     $name = $_POST['naam'];
     $company = $_POST['bedrijf'];
     $company = $_POST['bedrijf'];
Line 14: Line 15:
     $chk = $_POST['contact_me'];
     $chk = $_POST['contact_me'];


 
//wat je wilt zenden
     $body = "Van: $name\n Bedrijf: $company\n Tel: $tel\n E-mail: $email\n Vraag: $ask\n Contact mij: $chk\n ";
     $body = "Van: $name\n Bedrijf: $company\n Tel: $tel\n E-mail: $email\n Vraag: $ask\n Contact mij: $chk\n ";


  mail($to, $subject, $body, $headers);
//opdracht die je nodig hebt 
mail($to, $subject, $body, $headers);
  echo "Bedankt voor uw reactie.";
  echo "Bedankt voor uw reactie.";




}
}
// als er iets fout gaat
else {
else {
   echo "oeps, er iets fout gegaan!";
   echo "oeps, er iets fout gegaan!";

Revision as of 14:55, 19 January 2010

<?php

// waar je wilt zenden! if (isset($_POST['send'])) {

   $to = "info@tripany.com";
   $subject = "Contact";
   $headers = "From: Iphone widget!";

// opvang van gegevens

   $name = $_POST['naam'];
   $company = $_POST['bedrijf'];
   $tel =  $_POST['tel'];
   $email = $_POST['email'];
   $ask = $_POST['vraag'];
   $chk = $_POST['contact_me'];

//wat je wilt zenden

   $body = "Van: $name\n Bedrijf: $company\n Tel: $tel\n E-mail: $email\n Vraag: $ask\n Contact mij: $chk\n ";

//opdracht die je nodig hebt mail($to, $subject, $body, $headers);

echo "Bedankt voor uw reactie.";


} // als er iets fout gaat else {

 echo "oeps, er iets fout gegaan!";

}


?>