<?php
error_reporting(E_ALL);
$strEmpfaenger = 'meinemail';
$strFrom = '"absender';
$strSubject = 'Andere Spiele';
$strReturnhtml = 'index.php?site=games&id=new&done=true';
$strDelimiter = ":\t";
$done = isset($_GET['done']);
if($_POST)
{
$strMailtext = "";
while(list($strName,$value) = each($_POST))
{
if(is_array($value))
{
foreach($value as $value_array)
{
$strMailtext .= $strName.$strDelimiter.$value_array."\n";
}
}
else
{
$strMailtext .= $strName.$strDelimiter.$value."\n";
}
}
if(get_magic_quotes_gpc())
{
$strMailtext = stripslashes($strMailtext);
}
mail($strEmpfaenger, $strSubject, $strMailtext, "From: ".$strFrom)
or die("Die Mail konnte nicht versendet werden.");
header("Location: $strReturnhtml");
exit;
}
?>
<form name="Formular" onSubmit="return chkFormular()" action="<?php print $_SERVER['PHP_SELF']; ?>" method="post">
Hier die links und der include von der index.php:
// Games
case 'games':
$includePage = 'gam/index.php';
if(isset($_GET['console']))
{
switch($_GET['console'])
{
case 'xbox':
$includePage = 'gam/xbox360/index.php';
break;
case 'ps':
$includePage = 'gam/ps3/index.php';
break;
case 'pc':
$includePage = 'gam/pc/index.php';
break;
}
}
if(isset($_GET['id']))
{
switch($_GET['id'])
{
case 'new':
$includePage = 'gam/extraW/index.php';
break;
}
}
if(isset($_GET['done']))
{
switch($_GET['done'])
{
case 'true':
$includePage = 'gam/extraW/index.php';
break;
}
}
break;