<b>REGISTER</b>

GFX-Sector - PHP, MySQL


 
GFX-Sector » Coding Area » Webentwicklung » PHP, MySQL » [SUCHE]Kontakt-Formular » Hello Guest [Login|Register]
Last Post | First Unread Post Print Page | Recommend to a Friend | Add Thread to Favorites

PHP, MySQL

Themen rund um die serverseitige Programmierung mit PHP in Verbindung mit der Datenbanksoftware MySQL
Post New Thread Post Reply

[SUCHE]Kontakt-Formular

     Deutsche Version  English version
Author
Post « Previous Thread | Next Thread »

MC SERHAT MC SERHAT is a male
Rapmaster


Avatar von MC SERHAT

Registration Date: 27.12.2006
Posts: 179
Location: Turkey
Program: Photoshop CS3

Spacer
[SUCHE]Kontakt-Formular

[SUCHE]Kontakt-Formular

      

Hallo
Ich Suche eine Tutorial für die erstellung eines Kontakt Fomular!
Die Tutorial soll bitte auf Deutsch sein großes Grinsen

MFG
Serhat



Thanks for this thread by the author

Until now 1 user has thanked


MC SERHAT
[SUCHE]Kontakt-Formular 27.12.2006 12:04 MC SERHAT is offline Homepage of MC SERHAT Search for Posts by MC SERHAT

Fireball Fireball is a male
Boardchef


Avatar von Fireball

Registration Date: 11.11.2006
Posts: 16,355
Classing-Rank: GFX-Sector
Location: Bremen, Deutschland
Program: Adobe Photoshop CS2
Deviantart: oenismaster
Forums: (alle)

Spacer
      

php:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    <title>Kontaktformular</title>
    </head>
    <body>

    <h1>Kontakt</h1><br>

    <?php

    // *** Deine Mailadresse (Empfänger) ***
    $mail_to="deine@mailadresse.com";
    // *************************************

    $from_name=$_POST['fromname'];
    $from_mail=strtolower($_POST['frommail']);
    $mail_subject=$_POST['mailsubject'];
    $mail_text=$_POST['mailtext'];
    $send=$_POST['s'];

    if(trim($from_name)==""$err_text.="Bitte gib Deinen Namen an.<br>";
    if(trim($from_mail)=="")
      $err_text.="Bitte gib Deine E-Mail-Adresse an.<br>";
    else
      if(!ereg("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,6})$",$from_mail))
        $err_text.="Bitte gib eine gültige E-Mail-Adresse an.<br>";
    if(trim($mail_subject)==""$err_text.="Bitte gib einen Betreff ein.<br>";
    if(trim($mail_text)==""$err_text.="Bitte gib einen Nachrichtentext ein.<br>";

    // *** Zu langen Text abschneiden ***
    if(strlen($mail_text)>1000) {
      $mail_text=substr($mail_text,0,1000)."... (Text wurde gekürzt!)";
    }
    $from_name=str_replace(chr(34),"''",$from_name);
    $mail_subject=str_replace(chr(34),"''",$mail_subject);
    $from_name=stripslashes($from_name);
    $from_mail=stripslashes($from_mail);
    $mail_subject=stripslashes($mail_subject);
    $mail_text=stripslashes($mail_text);

    if(($send=="1") && (isset($err_text))) {
      echo "<p><big><b>Fehler:</b></big><br>";
      echo "$err_text</p>";
    }

    if(($send!="1") || (isset($err_text)))
    {
    ?>

    <form action="contact.php" method="post">
    <table border=0 cellspacing=2 cellpadding=0 width=100%>
    <tr><td nowrap align=right>Dein Name:</td><td>&nbsp;</td>
    <td width=100%><input type="text" name="fromname" size=50 maxlength=120 value="<?php echo $from_name?>"></td></tr>
    <tr><td nowrap align=right>Deine E-Mail Adresse:</td><td></td>
    <td width=100%><input type="text" name="frommail" size=50 maxlength=120 value="<?php echo $from_mail?>"></td></tr>
    <tr><td nowrap align=right>Betreff:</td><td></td>
    <td width=100%><input type="text" name="mailsubject" size=50 maxlength=120 value="<?php echo $mail_subject?>"></td></tr>
    <tr><td nowrap align=right valign=top>Text:<br><i>(max. 1.000 Zeichen)</i></td><td></td>
    <td width=100%><textarea cols="40" rows="10" name="mailtext"><?php echo $mail_text?></textarea></td></tr>
    <tr><td></td><td></td><td>
    <input type="hidden" value="1" name="s">
    <input type="submit" value="Nachricht versenden" name="submit">
    </td></tr>
    </table>
    </form>

    <?php
    } else {
      $header="From: $from_name <$from_mail>\n";
      $header.="Reply-To: $from_mail\n";
      $header.="X-Mailer: PHP-FormMailer (www.gfx-sector.de)\n";
      $header.="Content-Type: text/plain";
      $mail_date=gmdate("D, d M Y H:i:s")." GMT";
      $send=0;
      if(@mail($mail_to,$mail_subject,$mail_text,$header))
      {
        echo "<p><b>Deine E-Mail wurde abgesendet.</b></p>";
        echo "<p><a href=\"contact.php?from_name=$from_name&from_mail=$from_mail\">Zurück zum Formular</a></p>";
      }else{
        echo "<p><b>Beim Versenden der E-Mail ist ein Fehler aufgetreten!</b></p>";
        echo "<p><a href=\"contact.php?from_name=$from_name&from_mail=$from_mail&mail_subject=$mail_subject&mail_text=";
        echo urlencode($mail_text)."\">Zurück zum Formular</a></p>";
      }
    }
    ?>

    </body>
    </html>


Wink



[SUCHE]Kontakt-Formular 27.12.2006 12:56 Fireball is offline Homepage of Fireball Search for Posts by Fireball

MC SERHAT MC SERHAT is a male
Rapmaster


Avatar von MC SERHAT

Registration Date: 27.12.2006
Posts: 179
Location: Turkey
Program: Photoshop CS3

Thread Starter Thread Started by MC SERHAT
Spacer
      

Vielen Dank !!! großes Grinsen



MC SERHAT
[SUCHE]Kontakt-Formular 27.12.2006 13:47 MC SERHAT is offline Homepage of MC SERHAT Search for Posts by MC SERHAT

KevinH KevinH is a male
Buntstiftmaler


Avatar von KevinH

Registration Date: 27.01.2007
Posts: 82
Location: Kehlbach
Program: Photoshop 7

Spacer
      

Hier gibts auch ein gutes: http://kevin-h.de/?site=downloads&id=2&id2=&file_id=8



Ich biete günstige xHTML/CSS Umsetzungen an: kevin.hausen [at] gmail.com
[SUCHE]Kontakt-Formular 13.02.2007 15:37 KevinH is offline Homepage of KevinH Search for Posts by KevinH
 
Spacer
   
GFX-Sector
unregistered


 hat kein Avatar


Spacer

Have you enjoyed this topic?


If you were enjoying this post and if you keen on reading more interesting stuff then do not hesitate to complete the free sign up.

After the free registration you will gain access to all areas and you will be able to communicate with other artists from all over the world.

In addition you will benefit from our Photoshop and coding section as well as from our huge (hundreds of gigabytes) free resource section where you can find everything you will need to be a successful (web) designer/artist.

Sign up now and enjoy the advantages as a registered member.

(This website will be ad-free after a complete free sign up.)

New Post 13.02.2007 15:37  
Tree Structure | Board Structure
Post New Thread Post Reply
GFX-Sector » Coding Area » Webentwicklung » PHP, MySQL » [SUCHE]Kontakt-Formular

Similar topics to [SUCHE]Kontakt-Formular
Thread
Vorschlag : Formular Feedback (Forum: Feedback)
[Suche] Kontaktformular (Forum: Archiv)
Bestellformular (Forum: PHP, MySQL)
[Frage] Login + Anmeldeformular (Forum: Fragen & Probleme)
Impressum and Kontaktformular (Forum: Feedback)