Hi ich habe vor ein Emailprüfscript in eine Website einzubauen (für Feedback).
Doch ich habe mehrere Probleme:
form.php:
Problem:
pruefen.php:
KEIN Problem
testen.php:
Problem:
danke schonmal
Doch ich habe mehrere Probleme:
form.php:
PHP:
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
?>
E-Mail
Problem:
Code:
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /Applications/XAMPP/xamppfiles/htdocs/emailpruefen/form.php:6) in /Applications/XAMPP/xamppfiles/htdocs/emailpruefen/form.php on line 6
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /Applications/XAMPP/xamppfiles/htdocs/emailpruefen/form.php:6) in /Applications/XAMPP/xamppfiles/htdocs/emailpruefen/form.php on line 6
pruefen.php:
PHP:
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
//session_start();
$wert=rand(1, 1000000);
$_SESSION['wertesession'] = $wert;
$_SESSION['mail']=$_POST[email];
echo $wert;
if ($_POST[email]) {
// hier steht der mail-Befehl zum Versenden
mail($_POST[email],"",$wert);
echo "Erfolgreich verschickt";
} else {
echo "Bitte geben Sie etwas ein";
}
?>
Code:
Text:
KEIN Problem
testen.php:
PHP:
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
// hier steht der mail-Befehl zum Versenden
if($_SESSION['wertesession']==$_POST[text] && $_POST[nachricht]){
mail("email@test.de","Nachricht von $_SESSION['mail']",$_POST[nachricht]);
echo "Erfolgreich verschickt";
}
session_destroy();
?>
Problem:
Code:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /Applications/XAMPP/xamppfiles/htdocs/emailpruefen/testen.php on line 10
danke schonmal