Sebastian U.: Problem mit HTML Kontaktformular

Beitrag lesen

Hallo,

Das habe ich nun erledigt, beim Druck auf den Abschicken Button verweise ich nun auf die PHP Datei! funktioniert super danke. ich habe mir eine vorgefertigte PHP runtergeladen, die beinhaltet folgendes:

<?php

$name = $_POST["Name"];
$subject = $_POST["Subject"];
$message = $_POST["Message"];
$from = $_POST["Email"];

// remove the backslashes that normally appears when entering " or '
$name = stripslashes($name);
$message = stripslashes($message);
$subject = stripslashes($subject);
$from = stripslashes($from);

$to_address = "some.one@example.org";

// Check to see if a message was recieved
if(isset($message) and $message!="") {
    // send the message and show this page
    mail($to_address, 'Online Form: '.$subject, $_SERVER['REMOTE_ADDR']."\n\nName: ".$name."\n\n".$message, "From: $from");
} else {
    echo "no variables received, this page cannot be accessed directly";
    exit;
}
?>
<!DOCTYPE html>
<html lang="de">
    <head>
        <meta charset="utf-8">
        <title>Contact Form - Thank you</title>
    </head>
    <body>
        <p>Danke für Ihre Nachricht.</p>
    </body>
</html>

Jetzt müsste ich irgendwie die Daten weiterreichen ? und wo trage ich den SMTP Server ein?

Danke lg