Author Topic: contact formular  (Read 5607 times)

0 Members and 1 Guest are viewing this topic.

Offline osnapicture

  • Full Member
  • ***
  • Posts: 152
    • View Profile
contact formular
« on: June 07, 2009, 12:01:41 AM »
my contact formular is not running. can somone say what is wrong?


Code: [Select]
nger = "mail@mydomain.de";

if($_REQUEST['Send'])
{
    if(empty($_REQUEST['Name']) || empty($_REQUEST['Email']) || empty($_REQUEST['Nachricht']))
    {
        echo"Bitte geh <a href=\"javascript:history.back();\">zurück</a> und füll alle Felder aus!";
    }
    else
    {
        $Mailbetreff = "Kontakt: ";
        $Mailbetreff .= $_REQUEST['Betreff'];

        $Trenner = md5(uniqid(time()));

        $Header = "From: ".$_REQUEST['Email'];
        $Header .= "\n";
        $Header .= "MIME-Version: 1.0";
        $Header .= "\n";
        $Header .= "Content-Type: multipart/mixed; boundary=$Trenner";
        $Header .= "\n\n";
        $Header .= "This is a multi-part message in MIME format";
        $Header .= "\n";
        $Header .= "--$Trenner";
        $Header .= "\n";
        $Header .= "Content-Type: text/plain";
        $Header .= "\n";
        $Header .= "Content-Transfer-Encoding: 8bit";
        $Header .= "\n\n";
        $Header .= "Sie haben folgende Nachricht erhalten: \n\n";

        while(list($Formularfeld, $Wert) = each($_REQUEST))
        {
            if($Formularfeld != "Send" && $Formularfeld != "Anhang")
            {
                $Header .= $Formularfeld.": ".$Wert."\n";
            }
        }

        $Header .= "\nDatum/Zeit: ";
        $Header .= date("d.m.Y H:i:s");
        $Header .= "\n";
        $Header .= "--$Trenner";
        $Header .= "\n";
        $Header .= "Content-Type: ";
        $Header .= $_FILES['Anhang']['type'];
        $Header .= "; name=";
        $Header .= $_FILES['Anhang']['name'];
        $Header .= "\n";
        $Header .= "Content-Transfer-Encoding: base64";
        $Header .= "\n";
        $Header .= "Content-Disposition: attachment; filename=";
        $Header .= $_FILES['Anhang']['name'];
        $Header .= "\n\n";
        $Dateiinhalt = fread(fopen($_FILES['Anhang']['tmp_name'], "r"), $_FILES['Anhang']['size']);
        $Header .= chunk_split(base64_encode($Dateiinhalt));
        $Header .= "\n";
        $Header .= "--$Trenner--";

        mail($Empfaenger, $Mailbetreff, "", $Header);
        echo"Vielen Dank für Deine Bewerbung! Ich werde mich in Kürze bei Dir melden";
   
}
else
{
?>
<table border="0" cellpadding="1" cellspacing="2">
<form action="<?php echo$_SERVER['PHP_SELF']; ?>" enctype="multipart/form-data" method="post">
 <tr>
  <td align="right">Vorname:</td>
  <td colspan="2"><input name="Name" size="26" type="text"></td>
 </tr>
 <tr>
  <td align="right">Nachname:</td>
  <td colspan="2"><input name="Nachname" size="26" type="text"></td>
 </tr>
 <tr>
  <td align="right">Geburtsdatum:</td>
  <td colspan="2"><input name="Geburtsdatum" size="26" type="text"></td>
 </tr>
 <tr>
  <td align="right">Wohnort:</td>
  <td colspan="2"><input name="Wohnort" size="26" type="text"></td>
 </tr>
 <tr>
  <td align="right">Telefon:</td>
  <td colspan="2"><input name="Telefon" size="26" type="text"></td>
 </tr>
 <tr>
  <td align="right">Email:</td>
  <td colspan="2"><input name="Email" size="26" type="text"></td>
 </tr>
 <tr>
  <td align="right">Größe:</td>
  <td colspan="2"><input name="Groesse" size="26" type="text"></td>
 </tr>
 <tr>
  <td align="right">Gewicht:</td>
  <td colspan="2"><input name="Gewicht" size="26" type="text"></td>
 </tr>
 <tr>
  <td align="right">Erfahrungsstand:</td>
  <td colspan="2"><select name="Erfahrung" size="1"><option>keine Erfahrung als Model</option><option>mittelere Erfahrung</option><option>Profimodel</option></select></td>
 </tr>
 <tr>
  <td align="right">&nbsp;</td>
  <td colspan="2">&nbsp;</td>
 </tr>
 <tr>
  <td align="right">mögliche Einsatzbereiche:</td>
  <td><input type="checkbox" name="Portrait" value="ON"> Portrait</td>
  <td><input type="checkbox" name="Fashion" value="ON"> Fashion</td>
 </tr>
 <tr>
  <td align="right">&nbsp;</td>
  <td><input type="checkbox" name="Dessous" value="ON"> Dessous</td>
  <td><input type="checkbox" name="Bademoden" value="ON"> Bademoden</td>
 </tr>
 <tr>
  <td align="right">&nbsp;</td>
  <td><input type="checkbox" name="Teilakt" value="ON"> Teilakt</td>
  <td><input type="checkbox" name="Akt" value="ON"> Akt</td>
 </tr>
 <tr>
  <td align="right">&nbsp;</td>
  <td colspan="2"><input type="checkbox" name="Fetisch" value="ON"> Fetisch</td>
 </tr>
 <tr>
  <td align="right">&nbsp;</td>
  <td colspan="2">&nbsp;</td>
 </tr>
 <tr>
  <td align="right" colspan="3">
<p align="left">Bist Du mit einer Veröffentlichung der Fotos in den Medien
einverstanden?</td>
 </tr>
 <tr>
  <td align="right">&nbsp;</td>
  <td colspan="2"><input type="radio" value="V1" checked name="R1"> ja&nbsp;&nbsp;
<input type="radio" name="R1" value="V2"> nein</td>
 </tr>
 <tr>
  <td align="right" colspan="3">&nbsp;</td>
 </tr>
 <tr>
  <td align="right">Anmerkungen, Fragen <br>
und Wünsche:<br>
&nbsp;</td>
  <td colspan="2"><textarea cols="21" name="Nachricht" rows="7"></textarea></td>
 </tr>
 <tr>
  <td align="right">&nbsp;</td>
  <td colspan="2">&nbsp;</td>
 </tr>
 <tr>
  <td align="right">Foto:</td>
  <td colspan="2"><input name="Anhang" size="10" type="file"></td>
 </tr>
 <tr>
  <td align="center" colspan="3">&nbsp;</td>
 </tr>
 <tr>
  <td align="center" colspan="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <input name="Send" type="submit" value="Abschicken">    <input name="Reset" type="reset" value="Löschen"></td>
 </tr>
</form>
</table>
<?php
}

?>

</body>
</html>


Offline mawenzi

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: contact formular
« Reply #1 on: June 07, 2009, 12:23:41 AM »
... Doppelpost ... ?
... wir haben ein funktionierendes Kontaktformular ...
... [MOD] Contact Form : http://www.4homepages.de/forum/index.php?topic=8987.0 ...
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline vanesssa99

  • Pre-Newbie
  • Posts: 1
    • View Profile
Re: contact formular
« Reply #2 on: June 08, 2009, 03:35:33 AM »
Thannkns for idea, it's really useful  :roll:



simulationcredit

 

Post your comments here