kostenloser Webspace werbefrei: lima-city


Suche auf lima-city

  • in: MySQL abfrage verbinden...

    geschrieben von riko112

    Mysql Datenbank auslesen:
    http://www.homepage-total.de/mysql/datensaetze_auslesen.php
    http://www.homepage-total.de/bausteine/mysql_bausteine1.php#bs_3
  • in: PHP-Sterne auf eigener HP

    geschrieben von riko112

    http://www.homepage-total.de/bausteine/php_bausteine4.php#bs_14
  • in: PHP Kontaktformular

    geschrieben von riko112

    Homepage-total.de Kontaktformular Generator:
    http://www.webbausteine.de/
  • in: Problem mit Div Tag

    geschrieben von riko112

    #div a{
     z.B.:
     color: #ff0000;
     text-decoration: None;
    u.s.w.
    }
    
    <div id="div"><a href="adresse">link</a></div>
    
    <div id="anderer_div_tag"></div>
  • in: email vom kontaktformular

    geschrieben von riko112

    1mal kurz in einer datei aber ohne Design::wink:

    <!DOCTYPE html>
    <html>
     <head>
     <title></title>
     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
     <meta name="robots" content="noindex,nofollow">
    # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
    #
    #   Riko112.de 
    #   © &copy; 2011, by Riko Keil
    #
    # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
     <style type="text/css">
     /* Formular Stylesheet */
     body, textarea, table {
      font-family: Verdana, Sans-Serif;
      font-size: 12px;
      color: #000000;
     }
     table {
      margin: auto;
      border-spacing: 1px;
     }
     th, td {
      padding: 3px;
      font-weight: normal;
     }
     label {
      cursor: pointer;
     }
     textarea {
      width: 460px;
      height: 110px;
     }
     .pflichtfeld {
      color: #EE0000;
     }
     .hintergrund {
      color: #000000;
      background-color: #E6E6E6;
     }
     </style>
    
     </head>
     <body>
    
    <?php
    
    $webmaster = "dein name";
    
    
    $mailto = "deine.email@deine-webseite.de";
    
    
    $url = "deine-webseite.de";
    
    $eingabefehler = "";
    $anrede = isset($_POST["anrede"]) ? $_POST["anrede"] : "";
    $anredeCk = $_POST["anrede"] == "Frau" ? " checked='checked'" : "";
    $name = isset($_POST["name"]) ? $_POST["name"] : "";
    $mailfrom = isset($_POST["mailfrom"]) ? $_POST["mailfrom"] : "";
    $betreff = isset($_POST["betreff"]) ? $_POST["betreff"] : "";
    $nachricht = isset($_POST["nachricht"]) ? $_POST["nachricht"] : "";
    $kopie = isset($_POST["kopie"]) ? " checked='checked'" : "";
    
    // Spamschutz
    $zufallszahl1 = mt_rand(1, 90);
    $zufallszahl2 = mt_rand(1, 9);
    $ergebnis = md5($zufallszahl1 + $zufallszahl2);
    $code = "&#" . (48 + $zufallszahl2) . ";";
    
    // Formular
    $formular = "<form action='" . $_SERVER["SCRIPT_NAME"] . "' method='post'>
    <table>
     <tr><td colspan='2' class='pflichtfeld'><!-- Fehleranzeige --></td></tr>
     <tr class='hintergrund'>
      <td><label>Anrede:</label></td>
      <td><input type='radio' name='anrede' value='Herr' checked='checked' id='Herr'><label for='Herr'>Herr</label> 
      &nbsp; <input type='radio' name='anrede' value='Frau'" . $anredeCk . " id='Frau'><label for='Frau'>Frau</label></td>
     </tr>
     <tr class='hintergrund'>
      <td><label for='Name'>Name: <span class='pflichtfeld'>*</span></label></td>
      <td><input type='text' size='35' name='name' value='" . $name . "' id='Name'></td>
     </tr>
     <tr class='hintergrund'>
      <td><label for='Email'>E-Mail: <span class='pflichtfeld'>*</span></label></td>
      <td><input type='text' size='40' name='mailfrom' value='" . $mailfrom . "' id='Email'></td>
     </tr>
     <tr class='hintergrund'>
      <td><label for='Betreff'>Betreff: <span class='pflichtfeld'>*</span></label></td>
      <td><input type='text' size='49' name='betreff' value='" . $betreff . "' id='Betreff'></td>
     </tr>
     <tr class='hintergrund'>
      <td colspan='2'><label for='Nachricht'>Nachricht: <span class='pflichtfeld'>*</span></label><br>
      <textarea name='nachricht' id='Nachricht'>" . $nachricht . "</textarea></td>
     </tr>
     <tr class='hintergrund'>
      <td colspan='2'><input type='checkbox' id='marke3' name='kopie' $kopie> <label for='marke3'>Ich wünsche eine Kopie meiner Anfrage an meine E-Mail-Adresse</label></td>
     </tr>
     <tr class='hintergrund'>
      <td colspan='2'><label for='Spamschutz'>Spamschutz: <span class='pflichtfeld'>*</span></label> &nbsp; " . $zufallszahl1 . " &#43; " . $code . " = 
     <input type='text' name='zip' size='3' id='Spamschutz'><input type='hidden' name='zip2' value='" . $ergebnis . "'> <small>(Rechenaufgabe lösen)</small></td>
     </tr>
     <tr class='hintergrund'>
      <th colspan='2'>
       <br><span class='pflichtfeld'>*</span> <small>Bitte alle Pflichtfelder ausfüllen!</small> &nbsp; &nbsp; 
       <input type='button' onClick=\"location.href='" . $_SERVER["SCRIPT_NAME"] . "'\" value='Abbrechen'> &nbsp; &nbsp; 
       <input type='submit' name='sendung' value='Formular absenden'>
      </th>
     </tr>
    </table>
    </form>";
    
    if (isset($_POST["sendung"])) {
     // Pflichtfelder überprüfen
     if (strlen($name) <= 2) {$eingabefehler .= "&bull; Name fehlt!<br>";}
     if (!preg_match("/^([_a-z0-9-äöüß])(([-_a-z0-9-äöüß._])*([_a-z0-9-äöüß]))*\@([_a-z0-9-äöüß])(([_a-z0-9-äöüß-])*([_a-z0-9-äöüß]))+(\.([_a-z0-9-äöüß])([-a-z0-9_-])?([_a-z0-9-äöüß])+)+$/i", $mailfrom)) {
      $eingabefehler .= "&bull; Fehler in der E-Mail-Adresse!<br>";
     }
     if (strlen($betreff) <= 6) {$eingabefehler .= "&bull; Der Betreff " . ((strlen($betreff) == 0) ? " fehlt" : " ist zu kurz") . " (min. 7 Zeichen)!<br>";}
     if (strlen($nachricht) <= 19) {$eingabefehler .= "&bull; Die Nachricht " . ((strlen($nachricht) == 0) ? " fehlt" : " ist zu kurz") . " (min. 20 Zeichen)!<br>";}
     if (md5($_POST["zip"]) != $_POST["zip2"]) {$eingabefehler .= "&bull; Der Spamschutz ist leider falsch!<br>";}
     if ($eingabefehler == "") {
      // Diese Nachricht wird an Ihre E-Mail-Adresse gesendet (\n = neue Zeile)
      $text = "Datum: " . date("d.m.Y H:i") . "\n
       Anrede: $anrede \n
       Name: $name \n
       E-Mail: $mailfrom \n
       Betreff: $betreff \n
       Nachricht: $nachricht \n\n
       ";
      // E-Mail versenden
      @mail($mailto, $betreff, $text, "From: " . $mailfrom);
      // Bestätigung der E-Mail
      echo "<p style='text-align:center; margin-top:200px;'>";
      echo "Vielen Dank " . $anrede . " " . $name . ", die Nachricht wurde gesendet.<br><br>";
      if (isset($_POST["kopie"])) {
       // Diese Nachricht wird an die E-Mail-Adresse des Besuchers gesendet
       $kopie = "Vielen Dank für Ihren Besuch bei $url.\n
       Wir haben folgende Nachricht erhalten:\n\n
       ====\n\n 
       Anrede: $anrede \n
       Name: $name \n
       E-Mail: $mailfrom \n
       Betreff: $betreff \n
       Nachricht: $nachricht \n\n
       ====\n\n
       Mit freundlichen Grüßen,\n  $webmaster
       ";
       // E-Mail Kopie versenden
       @mail($mailfrom, "Kopie einer Anfrage", $kopie, "From: " . $mailto);
       // Bestätigung der E-Mail Kopie
       echo "Sie erhalten eine Kopie Ihrer Anfrage an Ihre E-Mail-Adresse.<br><br>";
      }
      // Link zur Startseite
      echo "<a href=\"" . $url . "\" target=\"_top\">Weiter zur Startseite</a></p>";
     }
     else {
      // Eingabefehler und Formular ausgeben
      echo str_replace("<!-- Fehleranzeige -->", "<strong>Die Nachricht wurde aus folgendem Grund nicht gesendet:</strong><br>$eingabefehler", $formular);
     }
    }
    else {
     // Formular ausgeben
     echo $formular;
    }
    ?>
    
     </body>
    </html>

    oder soll ich mir deinen nochmal ankuken.

Login zum Webhosting ohne Werbung!