Autor Beitrag
Bela Urlaub
ontopic starhalf ontopic starofftopic starofftopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 453

WinXP Prof/Home, Win98SE (nur auf Server)
D6 Pers
BeitragVerfasst: Fr 03.10.03 00:10 
Hi Leutz,
Ich hab n Prob.
Ich hab mir n Kontakt-Formular in PHP geschireben.
Eigentlich sollte es gehen aba geht net.
Ich hab schon verschiedene Möglichkeinten ausprobiert.
aba entweder bin ich zu blöd oda ich bin zu blöd :mrgreen:

Daher frag ich:
Hat jemand n gescheites PHP-Kontaktforumlar?

_________________
mensch, menschen können auch probleme haben...
maze2k
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 252

WIN 95, WIN NT 4.0, WIN 98, WIN 98SE, WIN 2000, RedHat Linux 7.3, Mandrake Linux 9.2, Knoppix Linux 3.3
D6 Pers
BeitragVerfasst: Fr 03.10.03 00:18 
ausblenden volle Höhe Quelltext
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:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
<?php
if (!empty($senden)) {
  if (!empty($name) && !empty($email) && !empty($art) && !empty($anfrage)) {
    $text = $anfrage."\n\n";
    $text .= "Anfrage von: \n";
    $text .= $title." ".$vorname." ".$name."\n";
    $text .= "Anschrift: \n";
    $text .= $strasse." ".$hausnummer."\n";
    $text .= $plz." ".$ort."\n";
    $text .= $land."\n";
    $text .= "Telefon: ".$telefon."\n";
    $text .= "E-Mail: ".$email."\n";
    $header = "From: \"".$vorname." ".$name."\" <".$email.">";
    mail("DEINE@EMAIL.ADRESSE", $art, $text, $header) ;
    echo "Ihre Anfrage wurde erfolgreich versendet";

  } else $fehler = "Bitte füllen Sie alle Felder, die mit einem <font color='#FF0000'>*</font> gekennzeichnet sind aus!<br><br>";
}


?>

<p align="left"><br>
  <font color="#0066CC">Kontaktformular</font><br>
  <br>
  <?php echo $fehler; ?>
<form action="formular.php" method="post">
<table border="0" cellspacing="0">
  <tr>
    <td colspan="2"><p>Titel</td>
  </tr>
  <tr>
    <td colspan="2">
      <select size="1" name="titel" width="150">
        <option value="Firma" <? if ($titel == "Firma") { echo "selected"; } ?> >Firma</option>
        <option value="Herr" <? if ($titel == "Herr") { echo "selected"; } ?> >Herr</option>
        <option value="Frau" <? if ($titel == "Frau") { echo "selected"; } ?> >Frau</option>
      </select>
    </td>
  </tr>
  <tr>
    <td><p><font color="#FF0000">*</font>Name</td>
    <td><p>Vorname</td>
  </tr>
  <tr>
    <td><input type="text" onClick="this.select();" name="name" value="<? echo $name; ?>" size="15" maxlength="35" /></td>
    <td><input type="text" onClick="this.select();" name="vorname" value="<? echo $vorname; ?>" size="15" maxlength="35" /></td>
  </tr>
  <tr>
    <td><p>Straße</td>
    <td><p>Hausnummer</td>
  </tr>
  <tr>
    <td><input type="text" onClick="this.select();" name="strasse" value="<? echo $strasse; ?>" size="15" maxlength="35" /></td>
    <td><input type="text" onClick="this.select();" name="hausnummer" value="<? echo $hausnummer; ?>" size="15" maxlength="35" /></td>
  </tr>
  <tr>
    <td><p>PLZ</td>
    <td><p>Ort</td>
  </tr>
  <tr>
    <td><input type="text" onClick="this.select();" name="plz" value="<? echo $plz; ?>" size="15" maxlength="35" /></td>
    <td><input type="text" onClick="this.select();" name="ort" value="<? echo $ort; ?>" size="15" maxlength="35" /></td>
  </tr>
  <tr>
    <td colspan="2"><p>Land</td>
  </tr>
  <tr>
    <td colspan="2"><input type="text" onClick="this.select();" name="land" value="<? echo $land; ?>" size="15" maxlength="35" /></td>
  </tr>
  <tr>
    <td colspan="2"><p>Telefonnummer (tagsüber)</td>
  </tr>
  <tr>
    <td colspan="2"><input type="text" onClick="this.select();" name="telefon" value="<? echo $telefon; ?>" size="15" maxlength="35" /></td>
  </tr>
  <tr>
    <td colspan="2"><p><font color="#FF0000">*</font>E-Mail Adresse</td>
  </tr>
  <tr>
    <td colspan="2"><input type="text" onClick="this.select();" name="email" value="<? echo $email; ?>" size="15" maxlength="35" /></td>
  </tr>
  <tr>
    <td colspan="2"><p><font color="#FF0000">*</font>Art der Anfrage</td>
  </tr>
  <tr>
    <td colspan="2">
      <select size="1" name="art" width="150">
        <option value="Frage zu dieser Seite" <? if ($art== "Frage zu dieser Seite") { echo "selected"; } ?> >Frage zu dieser Seite</option>
        <option value="Frage zu den Leistungen" <? if ($art== "Frage zu den Leistungen") { echo "selected"; } ?> >Frage zu den Leistungen</option>
        <option value="Angebotserstellung" <? if ($art== "Angebotserstellung") { echo "selected"; } ?> >Angebotserstellung</option>
        <option value="Sonstiges" <? if ($art== "Sonstiges") { echo "selected"; } ?> >Sonstiges</option>
      </select>
    </td>
  </tr>
  <tr>
    <td colspan="2"><p><font color="#FF0000">*</font>Anfrage</td>
  </tr>
  <tr>
    <td colspan="2"><textarea rows="5" name="anfrage" cols="40"><? echo $anfrage; ?></textarea></td>
  </tr>
</table>
<p>Die mit einem <font color="#FF0000">*</font> gekennzeichneten Felder müssen ausgefüllt werden. Alle anderen sind optional.<br><br>
<input type="submit" name="senden" value="Anfrage senden">
</form>


DEINE@EMAIL.ADRESSE ist die Adresse, an die das ganze dann geschickt werden soll...

_________________
Wer das Konzept der Unendlichkeit verstehen will, muss nur das Ausmaß menschlicher Dummheit betrachten. (Voltaire)
Bela Urlaub Threadstarter
ontopic starhalf ontopic starofftopic starofftopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 453

WinXP Prof/Home, Win98SE (nur auf Server)
D6 Pers
BeitragVerfasst: Fr 03.10.03 00:49 
Ui, Danke!
Allerdings sind ein paar Felder zu viel :D
Aber die mach ich dann schon raus ;9
THX! maze2k!

_________________
mensch, menschen können auch probleme haben...
maze2k
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 252

WIN 95, WIN NT 4.0, WIN 98, WIN 98SE, WIN 2000, RedHat Linux 7.3, Mandrake Linux 9.2, Knoppix Linux 3.3
D6 Pers
BeitragVerfasst: Fr 03.10.03 01:01 
Ja, war ja nur ein Beispiel *g* das is das Formular das ich für meine Seite geschrieben hab :)

Wollte es nich mehr abändern oder vereinfachen... is schon so spät *g*

_________________
Wer das Konzept der Unendlichkeit verstehen will, muss nur das Ausmaß menschlicher Dummheit betrachten. (Voltaire)
Bela Urlaub Threadstarter
ontopic starhalf ontopic starofftopic starofftopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 453

WinXP Prof/Home, Win98SE (nur auf Server)
D6 Pers
BeitragVerfasst: Fr 03.10.03 01:21 
Kannst dir ja mal jetzt die abgekürzte Version an schaun...
Ich geh jetzt pennen...

www.belaurlaub.net/n...x.php?action=kontakt
Cya

EDIT: Link geändert

_________________
mensch, menschen können auch probleme haben...


Zuletzt bearbeitet von Bela Urlaub am So 05.10.03 16:55, insgesamt 1-mal bearbeitet
maze2k
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 252

WIN 95, WIN NT 4.0, WIN 98, WIN 98SE, WIN 2000, RedHat Linux 7.3, Mandrake Linux 9.2, Knoppix Linux 3.3
D6 Pers
BeitragVerfasst: Fr 03.10.03 01:43 
Das ist doch schonmal net schlecht :)

Falls du noch Fragen zu PHP usw. hast poste ruch hier ins Forum, ich kenn mich da ein wenig aus *g*

_________________
Wer das Konzept der Unendlichkeit verstehen will, muss nur das Ausmaß menschlicher Dummheit betrachten. (Voltaire)
Bela Urlaub Threadstarter
ontopic starhalf ontopic starofftopic starofftopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 453

WinXP Prof/Home, Win98SE (nur auf Server)
D6 Pers
BeitragVerfasst: Fr 03.10.03 01:48 
ok,werd ich machen.
aba jetzt...jetzt geh ich erst mal pennen ;)
cya

_________________
mensch, menschen können auch probleme haben...