Ich hab ein großes Problem mit einer include - Datei.
Hab mir einen Formmailer (formmail.php) runtergeladen und in eine index.php includiert.
Alles funktioniert auch super.Nur wenn man dann eine Mail wegschickt kommt dann nicht nach dem senden die index.php , sondern die formmail.php.
Irgendwas stimmt da wohl nicht.
Was muß ich denn ändern?
Vielen Danke für eure Hilfe
Hier mal die index.php:
Code: Alles auswählen
<html>
<head>
<title>Zinie</title>
<link rel="stylesheet" type="text/css" href="../format.css" >
<script>
<!--
function BlurLinks(){
lnks=document.getElementsByTagName('a');
for(i=0;i<lnks.length;i++){
lnks[i].onfocus=new Function("if(this.blur)this.blur()");
}
}
onload=BlurLinks;
-->
</script>
<script src="../datumuhr.js" type="text/javascript"></script>
</head>
<body bgcolor="#000000" text="white" topmargin="10" marginheight="10" leftmargin="10" marginwidth="10" onload="window.setTimeout('datumuhr()',1000)">
<div align="center">
<table bgcolor="#e6e6e6" cellspacing="0" cellpadding="0" border="0" width="730" >
<tr>
<td width="100%" ><table cellspacing="1" cellpadding="0" border="0" width="100%">
<tr>
<td align="right" width="100%" colspan="2" bgcolor="#646B84" class="leiste">
<table cellspacing="0" cellpadding="0" border="0" >
<tr>
<td valign="top" align="right" ><form name="anzeige"><input size=10 name="date" class="datum" size="7"></form></td><td> </td>
<td align="right"><form name="anzeige2" ><input type="text" name="time" size="7" class="zeit" ></form></td><td > </td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor="#6e7591" valign="top" width="175" rowspan="3" >
<!--Beginn Menue linke Seite-->
<table border="0" cellpadding="0" cellspacing="0" width="175" height="93" style="border-collapse: collapse" >
<tr>
<td bgcolor="#646B84" class="leiste" height="24" valign="bottom" align="left" >
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" bordercolor="#E6E6E6" bgcolor="#9198AB">
<tr>
<td align="left"> <font color="#E6E6E6"> Menu</font></td>
</tr>
</table>
</td>
</tr>
</table>
<p><?php include("http://www.zinie.de/menu.htm");?>
<!--Ende Menue linke Seite--></td>
<td valign="middle" align="center" bgcolor="#9198ab" width="100%" height="72">
<img src="images/banner.gif" width="468" height="60" border="1" alt=""></td>
</tr>
<tr>
<td bgcolor="#6e7591" class="leiste"><img src="../images/space.gif" width="20" height="1" border="0" alt="">Startseite</td>
</tr>
<tr>
<td valign="top" bgcolor="#9198ab" width="100%" height="450" >
<br>
<!-- beginn hauptinhaltstabelle--><table border="0" cellpadding="0" cellspacing="0" width="100%" >
<tr>
<!-- abstand links vom inhalt--> <td width="20" ><img src="../images/space.gif" width="20" height="1" border="0" alt=""></td><!-- ende abstand links vom inhalt-->
<td valign="top" width="100%">
</td><!-- abstand rechts vom inhalt--> <td width="20" ><img src="../images/space.gif" width="20" height="1" border="0" alt=""></td><!-- ende abstand rechts vom inhalt-->
</tr>
</table><!--ende hauptinhaltstabelle-->
</td>
</tr>
<tr>
<td bgcolor="#646B84" class="leiste" style="background-color: #9198AB" >
<font color="#FFFFFF"> <span style="font-size:8pt"> Gaby Specht</span></font></td><td align="right" bgcolor="#646B84" class="leiste" > </td>
</tr>
</table></td>
</tr>
</table>
</div>
</body>
</html>
Und hier mal die formmail.php:
Code: Alles auswählen
<?php
include('./config.php');
require_once('./templates/tpl.php');
if ($REQUEST_METHOD != "POST"){showtpl($title,$text,$textfeld_name,$textfeld_email,$textfeld_betreff,$textfeld_message,$text_button,$font_face,$font_size, $bg_color,$text_color,$error_color,$errors);exit;}
if((!$email)||(!$subject)||(!$msg)){
showtpl($title,$text,$textfeld_name,$textfeld_email,$textfeld_betreff,$textfeld_message,$text_button,$font_face,$font_size, $bg_color,$text_color,$error_color,$error_input);
} else {
$msg = "Name: $user_n\nemail: $email\n\n\n$msg";
if(mail_it($msg,$subject,$email,$my_mail)){
showtplconfirm($title,$text,$textfeld_name,$textfeld_email,$textfeld_betreff,$textfeld_message,$text_button,$font_face,$font_size, $bg_color,$text_color,$error_color,$mail_confirm_text);
}}
function showtpl($title,$text,$textfeld_name,$textfeld_email,$textfeld_betreff,$textfeld_message,$text_button,$font_face,$font_size,$bg_color,$text_color,$error_color,$errors){
$tpl =& new Template('index.tpl');
$tpl->set('title', $title);
$tpl->set('text', $text);
$tpl->set('text_name', $textfeld_name);
$tpl->set('text_email', $textfeld_email);
$tpl->set('text_betreff', $textfeld_betreff);
$tpl->set('text_message', $textfeld_message);
$tpl->set('text_button', $text_button);
$tpl->set('size', $font_size);
$tpl->set('face', $font_face);
$tpl->set('bg_color', $bg_color);
$tpl->set('text_color', $text_color);
$tpl->set('error_color', $error_color);
$tpl->set('error_msg', $errors);
echo $tpl->fetch('index.tpl');
echo $q;
}
function showtplconfirm($title,$text,$textfeld_name,$textfeld_email,$textfeld_betreff,$textfeld_message,$text_button,$font_face,$font_size,$bg_color,$text_color,$error_color,$confirm){
$tpl =& new Template('confirm.tpl');
$tpl->set('title', $title);
$tpl->set('text', $text);
$tpl->set('text_name', $textfeld_name);
$tpl->set('text_email', $textfeld_email);
$tpl->set('text_betreff', $textfeld_betreff);
$tpl->set('text_message', $textfeld_message);
$tpl->set('text_button', $text_button);
$tpl->set('size', $font_size);
$tpl->set('face', $font_face);
$tpl->set('bg_color', $bg_color);
$tpl->set('text_color', $text_color);
$tpl->set('error_color', $error_color);
$tpl->set('confirm_msg', $confirm);
echo $tpl->fetch('confirm.tpl');
}
function mail_it($content, $subject, $email, $mail) {
if(mail($mail, $subject, $content ))
return true;
else
return false;
}
?>

Danke vielmals für eure Hilfe.
DP