+ Antworten
Ergebnis 1 bis 3 von 3

Thema: Formular sendet manchmal nicht

  1. #1
    TP-Junior Punky04 macht alles soweit korrekt
    Registriert seit
    Jan 2005
    Beiträge
    23

    Formular sendet manchmal nicht

    Hallo Leute

    ich habe ein Problem mit meinem Kontaktformular. Im Prinzip funktioniert es einwandfrei, aber irgendwie nur einmal. Ich kann das Formular einmal ausfüllen und abschicken und es kommt an, doch sobald ich gleich danach ein zweites formular ausfülle, steht zwar da, das es gesendet wurde, aber es kommt nicht an.
    Könnt Ihr mal drüber schauen, ob ich irgendwie nen Denkfehler habe.

    Hier mal der Code:
    PHP-Code:
    <?php
    $adresse 
    "max@mustermann.de";
    $absender "0";
    $umbruch "70";
    $bgcolor "#fecdc8";
    $textcolor "#000000";
    $fehlercolor "#FF3300";
    $head "";
    $add "";
    $lengtht strlen($_POST["send"]["termin"]);
    $lengthm strlen($_POST["send"]["mail"]);
    $lengtha strlen($_POST["send"]["autor"]);
    $lengthb strlen($_POST["send"]["betreff"]);
    $lengthn strlen($_POST["send"]["nachricht"]);
    $i "0";
    if (
    $absender == "0") {
        
    $from $adresse ; }
    else { 
    $from $_POST["send"]["mail"] ; }
    if(isset(
    $_POST["send"]) && is_array($_POST["send"])) {
        if(empty(
    $_POST["send"]["autor"])) {
            
    $fautor "Sie müssen einen Namen eingeben!<br>";
        } else { 
    $fautor "Name ok!<br>"$i++; }
        if(empty(
    $_POST["send"]["betreff"])) {
            
    $fbetreff "Sie müssen einen Betreff eingeben!<br>";
        } else { 
    $fbetreff "Betreff ok!<br>"$i++; }
        if(empty(
    $_POST["send"]["mail"])) {
            
    $fmail "Sie müssen Ihre E-Mail-Adresse eingeben!<br>";
        } else { 
    $fmail "Adresse ok!<br>"$i++; }
        if(empty(
    $_POST["send"]["nachricht"])) {
            
    $fnachricht "Sie müssen eine Nachricht eingeben!<br>";
        } else { 
    $fnachricht "Nachricht ok!<br>"$i++; }
        if (
    $lengthm "50") {
            
    $flmail "Ihre eingegebene E-Mail-Adresse ist zu lang!<br>"$fmail ""; }
        else { 
    $i++; }
        if (
    $lengtha "30") {
            
    $flautor "Ihr eingegebener Name ist zu lang!<br>"$fautor ""; }
        else { 
    $i++; }
        if (
    $lengthb "150") {
            
    $flbetreff "Ihr eingegebener Betreff ist zu lang!<br>"$fbetreff ""; }
        else { 
    $i++; }
        if (
    $lengthn "60000") {
            
    $flnachricht "Ihre eingegebene Nachricht darf nicht mehr<br> als 60000 Zeichen haben! Sie hat: ".$lengthn."<br>"$fnachricht ""; }
        else { 
    $i++; }
        if (!
    strpos($_POST["send"]["mail"], "@") == "false" or substr_count($_POST["send"]["mail"], "@") > 1) {
            
    $fgmail "Ihre angegebene E-Mail Adresse ist nicht gültig!<br>"$fmail ""; }
        else { 
    $i++; }
        if (
    substr_count($_POST["send"]["autor"], "@") >= 1) {
            
    $fgautor "Aus Sicherheitsgründen darf das Namensfeld kein @ Zeichen enthalten!<br>"$fautor "";
        } else { 
    $i++; }
        
    $str "";
        if (
    strcspn($_POST["send"]["mail"], $str) < $lengthm) {
            
    $fgmail "Ihre angegebene E-Mail Adresse ist nicht gültig!<br>"$fmail "" ;
        } else { 
    $i++ ; }
        if (
    get_magic_quotes_gpc() == "1") {
            
    $_POST["send"]["termin"] = stripslashes($_POST["send"]["termin"]);
            
    $_POST["send"]["autor"] = stripslashes($_POST["send"]["autor"]);
            
    $_POST["send"]["betreff"] = stripslashes($_POST["send"]["betreff"]);
            
    $_POST["send"]["mail"] = stripslashes($_POST["send"]["mail"]);
            
    $_POST["send"]["nachricht"] = stripslashes($_POST["send"]["nachricht"]);
        }
        
    $stermin htmlspecialchars($_POST["send"]["termin"]);
        
    $sautor htmlspecialchars($_POST["send"]["autor"]);
        
    $sbetreff htmlspecialchars($_POST["send"]["betreff"]);
        
    $smail htmlspecialchars($_POST["send"]["mail"]);
        
    $snachricht htmlspecialchars($_POST["send"]["nachricht"]);
    }
    if(isset(
    $_POST["send"]) && is_array($_POST["send"])) {
        if (
    $i == "11") {
            
    $autor $_POST["send"]["autor"];
            if (
    $umbruch == "no") {
                
    $texto $_POST["send"]["nachricht"] ;
                }
                else { 
    $texto wordwrap$_POST["send"]["nachricht"], $umbruch ); }
            
    $_POST["text"] = "Patientin: ".$_POST["send"]["autor"]." ".$_POST["send"]["tag"].".".$_POST["send"]["monat"].".".$_POST["send"]["jahr"]."\n \nEmail: mailto:".$_POST["send"]["mail"]."\n \nbraucht folgendes Rezept: ".$_POST["send"]["rezept"]."\n \nNachricht: \n \n$texto ";
            
    $fautor "<h2>Ihre Mail wurde versendet!</h2>";
            
    $fbetreff "";
            
    $fmail "";
            
    $ftermin "";
            
    $fnachricht "";
            if(empty(
    $add)) {
                
    $addp "";
                if (@
    mail($adresse$_POST['send']['betreff'], $_POST['text'], "From: \"$autor\" <$from>")) {
                    
    $fautor "<h2>Ihre Mail wurde versendet!</h2>";
                    unset(
    $sautor);
                    unset(
    $sbetreff);
                    unset(
    $smail);
                    unset(
    $stermin);
                    unset(
    $snachricht);
                } else {
                    
    $fautor "<h2>Fehler! Mail konnte nicht gesendet werden</h2>"; }
            } else {
                if (@
    mail($adresse$_POST['send']['betreff'], $_POST['text'], "From: \"$autor\" <$from>""-f $add")) {
                    
    $fautor "<h2>Ihre Mail wurde versendet!</h2>";
                    unset(
    $sautor);
                    unset(
    $sbetreff);
                    unset(
    $smail);
                    unset(
    $smail);
                    unset(
    $snachricht);
                }
                else {
                    
    $fautor "<h2>Fehler! Mail konnte nicht gesendet werden</h2>"; }
             }
           }
    }
    ?>
    und hier der zugehörige HTML Code

    HTML-Code:
    <html>
    <head><script language="JavaScript" src="calendar_eu.js"></script>
    	<link rel="stylesheet" href="calendar.css">
    <style type="text/css"><!--
    body }
     {
     font-family:Verdana,sans-serif;
     font-size:12px;
     color:<?php echo $textcolor ; ?>;
     background-color:<?php echo $bgcolor ; ?>;
     text-align:center;
    }
    a:link, a:visited, a:active {
      text-decoration:underline;
      font-weight:bold;
      color:#000000;
      font-size:10px;
    }
    a:hover {
     color:#8B0000;
    }
    h1 {
     font-size:18px;
     margin-top:30px;
    }
    h2 {
     font-size:18px;
    }
    .formular {
     margin:0px auto;
     width:480px;
     border:0px solid #000000;
     text-align:left;
    }
    .fehler {
     color:<?php echo $fehlercolor ; ?>;
     text-align:left;
    }
    .box {
     margin-top:10px;
    }
    .um {
     margin-left:105px;
    }
    .bez {
     float:left;
     text-align:left;
     width:9.5em;
     line-height:25px;
    }
    input {
     margin-top:5px;
    }
    .nachricht {
     clear:both;
     text-align:center;
    }
    .copy {
     font-size:10px;
     position:relative;top:30px;
    }
    #nachricht { width: 246px; height: auto; font-family: helvetica; }
    .dsR45 /*agl rulekind: base;*/ { height: 28px; font-family: helvetica; }
    #autor { width: 250px; height: auto; font-family: helvetica; }
    #betreff { width: 250px; height: 24px; font-family: helvetica; }
    #mail { width: 250px; height: auto; font-family: helvetica; }
    #rezept { width: 250px; height: auto; font-family: helvetica; }
    #tel { width: 250px; height: auto; font-family: helvetica; }
    #geburtsdatum { width: 250px; height: auto; font-family: helvetica; }
    #nachricht { width: 250px; height: auto; font-family: helvetica; }
    #tag { width: 40px; height: auto; font-family: helvetica; }
    #monat { width: 40px; height: auto; font-family: helvetica; }
    #jahr { width: 60px; height: auto; font-family: helvetica; }
    .ds2 /*agl rulekind: base;*/ { font-size: 10px; font-family: helvetica; }
    .ds3 /*agl rulekind: base;*/ { font-size: 10px; font-family: helvetica; }
    .dsR66 /*agl rulekind: base;*/ { width: 110px; height: auto; font-family: helvetica; }
    .dsR91 /*agl rulekind: base;*/ { font-family: Helvetica, Geneva, Arial, SunSans-Regular, sans-serif; height: 152px; }
    .dsR164 /*agl rulekind: base;*/ { width: 462px; height: auto; font-family: helvetica; }
    .dsR165 /*agl rulekind: base;*/ { width: 463px; height: auto; font-family: helvetica; }
    .dsR166 /*agl rulekind: base;*/ { font-size: 10pt; font-family: Helvetica, Geneva, Arial, SunSans-Regular, sans-serif; font-weight: normal; font-style: normal; width: 460px; height: 309px; }
    .dsR281 /*agl rulekind: base;*/ { font-size: 10pt; font-family: Helvetica, Geneva, Arial, SunSans-Regular, sans-serif; font-weight: normal; font-style: normal; width: 130px; height: 28px; }
    .dsR282 /*agl rulekind: base;*/ { font-size: 10pt; font-family: Helvetica, Geneva, Arial, SunSans-Regular, sans-serif; font-weight: normal; font-style: normal; width: 130px; height: 152px; }
    --></style>
    <title>Kontakt</title>
    <meta name='author' content='Daniel Lokau'>
    <meta http-equiv='Content-Type' content='text/html; charset=ISO-8859-1'>
    </head>
    <body bgcolor="#fdd5dd">
    		<h1><?php echo $head ; ?></h1>
    		<form name="testform" class="formular dsR165" action="<?php echo $PHP_SELF;?>" method="post" target="_self">
    			<div class="fehler dsR164">
    				<?php echo $fautor ; echo $ftag ; echo $fmonat ; echo $fjahr ; echo $fmail ; echo $ftel ; echo $ftermin ; echo $frezept ; echo $fbetreff ; echo $fnachricht ; echo $flautor ; echo $fltag ; echo $flmonat ; echo $fljahr ; echo $flmail ; echo $fltel ; echo $fltermin ; echo $flrezept ; echo $flbetreff ; echo $fgmail ; echo $fgautor ;?></div>
    			<div class="box dsR66"><table width="482" border="0" cellspacing="2" cellpadding="0">
    					<tr height="30">
    						<td width="105" height="30"><font size="2" face="Helvetica, Geneva, Arial, SunSans-Regular, sans-serif">Name:</font></td>
    						<td width="6" height="30"></td>
    						<td width="253" height="30"><input name="send[autor]" type="text" id="autor" size="22" value="<?php echo $sautor ; ?>"></td>
    						<td width="100" height="30">
    							
    						</td>
    					</tr>
    					<tr height="30">
    						<td width="105" height="30"><font size="2" face="Helvetica, Geneva, Arial, SunSans-Regular, sans-serif">Geburtsdatum:</font></td>
    						<td width="6" height="30"></td>
    						<td width="253" height="30"><select name="send[tag]" class="text" id="tag" size="1">
    								<option value="01">01</option>
    								<option value="02">02</option>
    								<option value="03">03</option>
    								<option value="04">04</option>
    								<option value="05">05</option>
    								<option value="06">06</option>
    								<option value="07">07</option>
    								<option value="08">08</option>
    								<option value="09">09</option>
    								<option value="10">10</option>
    								<option value="11">11</option>
    								<option value="12">12</option>
    								<option value="13">13</option>
    								<option value="14">14</option>
    								<option value="15">15</option>
    								<option value="16">16</option>
    								<option value="17">17</option>
    								<option value="18">18</option>
    								<option value="19">19</option>
    								<option value="20">20</option>
    								<option value="21">21</option>
    								<option value="22">22</option>
    								<option value="23">23</option>
    								<option value="24">24</option>
    								<option value="25">25</option>
    								<option value="26">26</option>
    								<option value="27">27</option>
    								<option value="28">28</option>
    								<option value="29">29</option>
    								<option value="30">30</option>
    								<option value="31">31</option>
    							</select><select name="send[monat]" class="text" id="monat" size="1">
    								<option value="01">01</option>
    								<option value="02">02</option>
    								<option value="03">03</option>
    								<option value="04">04</option>
    								<option value="05">05</option>
    								<option value="06">06</option>
    								<option value="07">07</option>
    								<option value="08">08</option>
    								<option value="09">09</option>
    								<option value="10">10</option>
    								<option value="11">11</option>
    								<option value="12">12</option>
    							</select><select name="send[jahr]" class="text" id="jahr" size="1">
    								<option value="1910">1910</option>
    								<option value="1911">1911</option>
    								<option value="1912">1912</option>
    								<option value="1913">1913</option>
    								<option value="1914">1914</option>
    								<option value="1915">1915</option>
    								<option value="1916">1916</option>
    								<option value="1917">1917</option>
    								<option value="1918">1918</option>
    								<option value="1919">1919</option>
    								<option value="1920">1920</option>
    								<option value="1921">1921</option>
    								<option value="1922">1922</option>
    								<option value="1923">1923</option>
    								<option value="1924">1924</option>
    								<option value="1925">1925</option>
    								<option value="1926">1926</option>
    								<option value="1927">1927</option>
    								<option value="1928">1928</option>
    								<option value="1929">1929</option>
    								<option value="1930">1930</option>
    								<option value="1931">1931</option>
    								<option value="1932">1932</option>
    								<option value="1933">1933</option>
    								<option value="1934">1934</option>
    								<option value="1935">1935</option>
    								<option value="1936">1936</option>
    								<option value="1937">1937</option>
    								<option value="1938">1938</option>
    								<option value="1939">1939</option>
    								<option value="1940">1940</option>
    								<option value="1941">1941</option>
    								<option value="1942">1942</option>
    								<option value="1943">1943</option>
    								<option value="1944">1944</option>
    								<option value="1945">1945</option>
    								<option value="1946">1946</option>
    								<option value="1947">1947</option>
    								<option value="1948">1948</option>
    								<option value="1949">1949</option>
    								<option value="1950">1950</option>
    								<option value="1951">1951</option>
    								<option value="1952">1952</option>
    								<option value="1953">1953</option>
    								<option value="1954">1954</option>
    								<option value="1955">1955</option>
    								<option value="1956">1956</option>
    								<option value="1957">1957</option>
    								<option value="1958">1958</option>
    								<option value="1959">1959</option>
    								<option value="1960">1960</option>
    								<option value="1961">1961</option>
    								<option value="1962">1962</option>
    								<option value="1963">1963</option>
    								<option value="1964">1964</option>
    								<option value="1965">1965</option>
    								<option value="1966">1966</option>
    								<option value="1967">1967</option>
    								<option value="1968">1968</option>
    								<option value="1969">1969</option>
    								<option value="1970">1970</option>
    								<option value="1971">1971</option>
    								<option value="1972">1972</option>
    								<option value="1973">1973</option>
    								<option value="1974">1974</option>
    								<option value="1975">1975</option>
    								<option value="1976">1976</option>
    								<option value="1977">1977</option>
    								<option value="1978">1978</option>
    								<option value="1979">1979</option>
    								<option value="1980">1980</option>
    								<option value="1981">1981</option>
    								<option value="1982">1982</option>
    								<option value="1983">1983</option>
    								<option value="1984">1984</option>
    								<option value="1985">1985</option>
    								<option value="1986">1986</option>
    								<option value="1987">1987</option>
    								<option value="1988">1988</option>
    								<option value="1989">1989</option>
    								<option value="1990">1990</option>
    								<option value="1991">1991</option>
    								<option value="1992">1992</option>
    								<option value="1993">1993</option>
    								<option value="1994">1994</option>
    								<option value="1995">1995</option>
    								<option value="1996">1996</option>
    								<option value="1997">1997</option>
    								<option value="1998">1998</option>
    								<option value="1999">1999</option>
    								<option value="2000">2000</option>
    								<option value="2001">2001</option>
    								<option value="2002">2002</option>
    								<option value="2003">2003</option>
    								<option value="2004">2004</option>
    								<option value="2005">2005</option>
    								<option value="2006">2006</option>
    								<option value="2007">2007</option>
    								<option value="2008">2008</option>
    								<option value="2009">2009</option>
    								<option value="2010">2010</option>
    							</select></td>
    						<td width="100" height="30"></td>
    					</tr>
    					<tr height="30">
    						<td width="105" height="30"><font size="2" face="Helvetica, Geneva, Arial, SunSans-Regular, sans-serif">Betreff:</font></td>
    						<td width="6" height="30"></td>
    						<td width="253" height="30"><input name="send[betreff]" type="text" id="betreff" size="22" value="Rezept"></td>
    						<td width="100" height="30"></td>
    					</tr>
    					<tr height="30">
    						<td width="105" height="30"><font size="2" face="Helvetica, Geneva, Arial, SunSans-Regular, sans-serif">Email:</font></td>
    						<td width="6" height="30"></td>
    						<td width="253" height="30"><input name="send[mail]" type="text" id="mail" size="22" value="<?php echo $smail ; ?>"></td>
    						<td width="100" height="30"></td>
    					</tr>
    					<tr height="30">
    						<td width="105" height="30"><font size="2" face="Helvetica, Geneva, Arial, SunSans-Regular, sans-serif">Wof&uuml;r brauchen Sie ein Rezept:</font></td>
    						<td width="6" height="30"></td>
    						<td width="253" height="30"><input name="send[rezept]" type="text" id="rezept" size="22" value="<?php echo $srezept ;?>"></td>
    						<td width="100" height="30"></td>
    					</tr>
    					<tr height="30">
    						<td width="105" height="30"><font size="2" face="Helvetica, Geneva, Arial, SunSans-Regular, sans-serif">Bemerkung:<br>
    								<br>
    								<br>
    								<br>
    							</font></td>
    						<td width="6" height="30"></td>
    						<td width="253" height="30"><textarea name="send[nachricht]" id="nachricht" rows="4" cols="28">Hallo
    ich w&uuml;rde das Rezept im Laufe des Tages abholen.
    Vielen Dank<?php echo $snachricht ;?></textarea></td>
    						<td width="100" height="30"></td>
    					</tr>
    					<tr height="30">
    						<td width="105" height="30"></td>
    						<td width="6" height="30"></td>
    						<td width="253" height="30"><input type="submit" value="Absenden"></td>
    						<td width="100" height="30"></td>
    					</tr>
    				</table>
    			</div>
    		</form>
    		
    	</body>
    </html>
    Danke schon mal im voraus

  2. #2
    TP-Supporter threadi macht sich hier sehr viel Mühe
    Registriert seit
    Dec 2006
    Beiträge
    453
    Beim Drüberschauen sehe ich da kein Problem. Was sagt dein Webspace-Hoster dazu? Sperrt ggfs. dessen Mail-Programm einen wiederholten Versand nach X Minuten?

  3. #3
    TP-Junior Punky04 macht alles soweit korrekt
    Registriert seit
    Jan 2005
    Beiträge
    23
    keine Ahnung werd mal nachfragen

+ Antworten

Ähnliche Themen

  1. Mail sendet nicht mehr...
    Von NanneSmile im Forum Mac OS
    Antworten: 11
    Letzter Beitrag: 31.08.2005, 12:56
  2. Firefox sendet, IE nicht?
    Von Stefan im Forum Traum-Dynamik
    Antworten: 2
    Letzter Beitrag: 12.08.2005, 14:38
  3. Formular sendet nicht
    Von jph im Forum HTML & CSS
    Antworten: 0
    Letzter Beitrag: 31.05.2004, 18:04
  4. Formular sendet Inhalte nur unvollständig
    Von kenny im Forum HTML & CSS
    Antworten: 9
    Letzter Beitrag: 17.06.2003, 13:24

Aktive Benutzer

Aktive Benutzer

Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)

     

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