Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature may not be available in some browsers.
Wie Funktioniert, das wie Einfügen, und wie das ganze.Hallo Obst,
nicht direkt. Du musst zum ausführen der Aktion, dass HTML Dokument als PHP abspeichern und ein kleinen wenig PHP einfügen.
Entsprechende Scripte findest du zu hauf im Netz.
Hier einmal meine Lösung:
-------------------------------------------------------------------------------------------------------------------
Html (z.B.:kontakt.html):
<form action="scripts/kontaktformularverarbeitung.php" method="post"> <div align="center"> Hier kommt dann dein Formular
----------------------------------------------------------------------------
Beispiel:
<div align="center">Name: <input name="name" size="40"/> <br /> <br /> E-Mail: <input name="email" size="40"/> <br /> <br /> Betreff: <select name="betreff"size="1"> <option>Fragen</option> <option>Kritik</option> <option>Linktausch</option> <option>Werbung</option> <option>Sonstiges</option> </select> <br /> <br /> Nachricht: <br /> <br /> <textarea name="text" cols="50" rows="10"></textarea> <br /> <br />
------------------------------------------------------------------ <input name="submit" type="submit" value="absenden"/> </div> </form>
----------------------------------------------------------------------------------------------------
externes PHP-Script(z.B.:kontaktformularverarbeitung.php):
<html>
<head>
<title>Kontaktformular</title>
</head>
<body>
<?php
$Empfaenger = "deine E-Mail Adresse";
if($_REQUEST['submit']){
if(empty($_REQUEST['name']) || empty($_REQUEST['email']) || empty($_REQUEST['text']))
{
echo "Bitte gehen Sie <a href=\"javascript:history.back();\">zurück</a> und füllen Sie alle Felder aus";
}
else{
$email="Sie haben eine Anfrage über ihr Kontaktformular erhalten:\n\n";
while(list($Formularfeld, $Wert)=each($_REQUEST))
{
if($Formularfeld!="submit")
{
$Mailnachricht .= $Formularfeld.": ".$Wert."\n";
}
}
$Mailnachricht .= "\nDatum/Zeit: ";
$Mailnachricht .= date("d.m.Y H:i:s");
$Mailbetreff = "Kontakt: ";
$Mailbetreff .= $_REQUEST['betreff'];
mail($Empfaenger, $Mailbetreff, $Mailnachricht, "From: ".$_REQUEST['email']);
}
}
?>
<a href="Pfad deines Kontaktformular HTML">Zurück</a>
</body>
</html>
Es gibt sicher noch saubere Lösungen aber ich hoffe ich konnte dir weiterhelfen.
Mfg
Björn