Kann man 2 php scripte von einem Button aus ansteuern?
Mit dem ersten wird ein Gästebuch verwaltet und das zweite soll mir eine Mail schicken, wenn es einen neuen Eintag gibt.
GuestBook2.php
Name, Email und Comments sind Variablen.
Denke es ist soweit alles richtig, es schickt aber keine Email ?
Hab auch schon versucht das:
...in die GuestBook.php einzufügen. Das geht aber auch net ;(
Gruss René
Code:
on (release) {
if (Email.indexOf("@") != -1 && Email.indexOf(".") != -1 && Name != "" && Comments != "") {
Submit = "Yes";
NumHigh = 10;
NumLow = 0;
loadVariables("GuestBook.php", this, "POST");
loadVariables["GuestBook2.php", this, "POST");
mc.Status = "Viele Dank für Deinen Eintrag";
}
if (Name == "") {
mc.Status = "Dein Name fehlt!";
}
if (Comments == "") {
mc.Status = "Dein Eintag fehlt!";
}
if (Email.indexOf("@") == -1 || Email.indexOf(".") == -1) {
mc.Status = "Falsche email";
}
}
GuestBook2.php
PHP:
<?php
$MailTo = "post@faithanddoubt.de";
$subject = "FAD - Neuer Gaestebuch Eintrag";
mail($MailTo, $subject, $Name, $Email, $Comments, "From: $Email");
?>
Name, Email und Comments sind Variablen.
Denke es ist soweit alles richtig, es schickt aber keine Email ?
Hab auch schon versucht das:
PHP:
$MailTo = "post@faithanddoubt.de";
$subject = "FAD - Neuer Gaestebuch Eintrag";
mail($MailTo, $subject, $Name, $Email, $Comments, "From: $Email");
Gruss René