Jump to content


Photo

Simple Formula, no clue


  • Please log in to reply
3 replies to this topic

#1 Nurmala

Nurmala
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 27 March 2006 - 05:14 PM

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.c...ontaktform.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-sch...ontaktform.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



#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 27 March 2006 - 05:31 PM

Chnage your whole code to the following:
<?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");

?>


#3 Nurmala

Nurmala
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 27 March 2006 - 09:08 PM

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?

#4 Nurmala

Nurmala
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 28 March 2006 - 06:15 PM

I've tried setting the CHMOD properties to 777 but tit hasn't helped. Can anyone help out here?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users