Jump to content

Archived

This topic is now archived and is closed to further replies.

Nurmala

Simple Formula, no clue

Recommended Posts

Hello,

I unfortunately have no clue what I am doing here. Would anyone be willing to give me a tip here?

I am making some changes to a web page that I did not make. (http://www.asset-schools.de/ )Before changing it the top of the Formula looked like this:

<form name="Formular" action="http://www.isdgmbh.com/ASSET/1024x768/php/kontaktform.php" method="POST" onSubmit="return chkFormular()">

After I had made the necessary changes in the form (updated emails), the form still sent the responses to the wrong email addresses. I then realize that the "action" was set to an some other url , isdgmbh.com, so I changed the address to send the php file on our own server.


<form name="Formular" action="http://www.asset-schools.de/1024x768/php/kontaktform.php" method="POST" onSubmit="return chkFormular()">

That didn't work at all.

The php on kontakform.php looks like this:

[!--fonto:Courier New--][span style=\"font-family:Courier New\"][!--/fonto--][!--sizeo:3--][span style=\"font-size:12pt;line-height:100%\"][!--/sizeo--]

<?

session_start();

session_register("abfrage_session");




$abfrage_session = "Anrede : ".$HTTP_POST_VARS["anrede"]."\n";

$abfrage_session = $abfrage_session."Vorname : ".$HTTP_POST_VARS["vorname"]."\n";

$abfrage_session = $abfrage_session."Name : ".$HTTP_POST_VARS["name"]."\n";

$abfrage_session = $abfrage_session."Anschrift : ".$HTTP_POST_VARS["anschrift"]."\n\n";

$abfrage_session = $abfrage_session."PLZ : ".$HTTP_POST_VARS["plz"]."\n";
$abfrage_session = $abfrage_session."Ort : ".$HTTP_POST_VARS["ort"]."\n";

$abfrage_session = $abfrage_session."Tel : ".$HTTP_POST_VARS["tel"]."\n\n";
$abfrage_session = $abfrage_session."eMail : ".$HTTP_POST_VARS["email"]."\n\n";

$abfrage_session = $abfrage_session."Art d. Interesses : ".$HTTP_POST_VARS["Bucher"]."\n\n";
$abfrage_session = $abfrage_session."Produktinteresse : ".$HTTP_POST_VARS["produkt"]."\n\n";
$abfrage_session = $abfrage_session."Trainingsform : ".$HTTP_POST_VARS["Art"]."\n\n";

$abfrage_session = $abfrage_session."Nachricht : ".$HTTP_POST_VARS["anfrage"]."\n";




// Mail verschicken



$mailSubject = "Kontakt über A.S.S.E.T- Website";

$mailFrom = "WEB-Kontaktformular" ;



// mail("isd@isdgmbh.com", $mailSubject, $abfrage_session,"From: $mailFrom\nReply-To: ".$HTTP_POST_VARS['email']."\nX-Mailer: PHP/" . phpversion());
// mail("rene.gyurcsik@isdgmbh.de", $mailSubject, $abfrage_session,"From: $mailFrom\nReply-To: ".$HTTP_POST_VARS['email']."\nX-Mailer: PHP/" . phpversion());

$mailTo = "$Empfaenger" ;
$mailSubject = "ASSET-Anfrage für $Empfaenger";
$mailFrom = "ASSET Webseite" ;
mail($mailTo, $mailSubject, $abfrage_session,"From: $mailFrom\nReply-To: ".$HTTP_POST_VARS['email']."\nX-Mailer: PHP/" . phpversion());
mail("braunschweig@stevens-english.de", $mailSubject, $abfrage_session,"From: $mailFrom\nReply-To: ".$HTTP_POST_VARS['email']."\nX-Mailer: PHP/" . phpversion());

header("Location: ../nachricht.html");





?>
[!--sizec--][/span][!--/sizec--] [!--fontc--][/span][!--/fontc--]

I unfortunately cannot see the php file that is on the other server so I don't know why one works and the other doesn't.

Can anyone help me out ?

Nurmala

Share this post


Link to post
Share on other sites
Chnage your whole code to the following:
[code]<?php

session_start();

$_SESSION['abfrage_session'] = "Anrede : " . $_POST["anrede"] . "\n";
$_SESSION['abfrage_session'] .= "Vorname : " . $_POST["vorname"] . "\n";
$_SESSION['abfrage_session'] .= "Name : " . $_POST["name"] . "\n";
$_SESSION['abfrage_session'] .= "Anschrift : " . $_POST["anschrift"] . "\n\n";
$_SESSION['abfrage_session'] .= "PLZ : " . $_POST["plz"] . "\n";
$_SESSION['abfrage_session'] .= "Ort : " . $_POST["ort"] . "\n";
$_SESSION['abfrage_session'] .= "Tel : " . $_POST["tel"] . "\n\n";
$_SESSION['abfrage_session'] .= "eMail : " . $_POST["email"] . "\n\n";
$_SESSION['abfrage_session'] .= "Art d. Interesses : " . $_POST["Bucher"] . "\n\n";
$_SESSION['abfrage_session'] .= "Produktinteresse : " . $_POST["produkt"] . "\n\n";
$_SESSION['abfrage_session'] .= "Trainingsform : " . $_POST["Art"].  "\n\n";
$_SESSION['abfrage_session'] .= "Nachricht : " . $_POST["anfrage"] . "\n";

// Mail verschicken
$mailSubject = "Kontakt über A.S.S.E.T- Website";
$mailFrom = "WEB-Kontaktformular";

// mail("isd@isdgmbh.com", $mailSubject, $abfrage_session,"From: $mailFrom\nReply-To: ".$HTTP_POST_VARS['email']."\nX-Mailer: PHP/" . phpversion());
// mail("rene.gyurcsik@isdgmbh.de", $mailSubject, $abfrage_session,"From: $mailFrom\nReply-To: ".$HTTP_POST_VARS['email']."\nX-Mailer: PHP/" . phpversion());

$mailTo = $Empfaenger;
$mailSubject = "ASSET-Anfrage für " . $Empfaenger;
$mailFrom = "ASSET Webseite";

mail($mailTo, $mailSubject, $_SESSION['abfrage_session'], "From: $mailFrom\nReply-To: " . $_POST['email'] . "\nX-Mailer: PHP/" . phpversion());
mail("braunschweig@stevens-english.de", $mailSubject, $_SESSION['abfrage_session'], "From: $mailFrom\nReply-To: " . $_POST['email'] . "\nX-Mailer: PHP/" . phpversion());

header("Location: ../nachricht.html");

?>[/code]

Share this post


Link to post
Share on other sites
Hi Thanks,

That probably helped, but I think there might be a problem with the server or is the CHMODD properties? This is the message that comes back after submitting.

Method Not Allowed
The requested method POST is not allowed for the URL /1024x768/php/kontaktform.php

any clue?

Share this post


Link to post
Share on other sites
I've tried setting the CHMOD properties to 777 but tit hasn't helped. Can anyone help out here?

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.