PHP Formmailer Problem

Apache, Lighttpd, nginx, Cherokee
Locked
marcompl
Posts: 10
Joined: 2004-07-09 19:13
 

PHP Formmailer Problem

Post by marcompl »

Hallo Leute,

ich bin von einem 1&1 Paket auf einen Strato Server gewechselt.
Auf dem Puretec Paket hatte (habe) ich in einigen Internet-Präsenzen
einen Formmailer eingebaut. Hat auch immer Problemlos funktioniert.

Auf dem Strato Server gibt es Probleme - hier mal der Code des Formmailers:

Code: Select all

<?php

if ($email!="" ) {

  $admin= 'info@example.com';
  $subject= 'Anfrage von example.com';
  $message= 'Nachrichten an '.$admin.' von '.$email.":nn";
  foreach($HTTP_POST_VARS as $name=> $value) {
    $message.= "$name:   $valuen";
  }
  mail($admin, $subject, $message, "From: $email");
  header('Location: formok.html');

}
else {

header("location: formnotok.html");

}

?>
Egal ob ich das email-Feld ausfülle oder nicht - es kommt immer die
formnotok.html (Hinweis auf nicht ausgefülltes eMail-Feld).
Die Formular-Felder sind ganz sicher richtig beschriftet.
Wenn ich die if Abfrage für das email Feld rausnehme wird das Formular
ordnungsgemäß versandt.

Das verstehe ich echt nicht, ich habe nichts verändert.
Ein PHPbb auf dem gleichen Server funktioniert z.B. problemlos.

Bin über jeden Hinweis dankbar.
outofbound
Posts: 470
Joined: 2002-05-14 13:02
Location: Karlsruhe City
 

Re: PHP Formmailer Problem

Post by outofbound »

man register_globals ?
marcompl
Posts: 10
Joined: 2004-07-09 19:13
 

Re: PHP Formmailer Problem

Post by marcompl »

OutOfBound wrote:man register_globals ?
:wink: Danke, das war's

hab jetzt einfach

Code: Select all

<?php 
    extract($_REQUEST); 
?> 
eingefügt.
metrax
Posts: 194
Joined: 2003-02-22 22:51
Location: München / Berg-am-Laim
Contact:
 

Re: PHP Formmailer Problem

Post by metrax »

herzlichen dank für diese frage, die wir nun schon mindestens zum 200sten mal beantworten durfen.

MfG
Robert
arty
Userprojekt
Userprojekt
Posts: 729
Joined: 2002-06-12 10:11
Contact:
 

Re: PHP Formmailer Problem

Post by arty »

MarcoMPL wrote:

Code: Select all

<?php

if ($email!="" ) {

  $admin= 'info@example.com';
  $subject= 'Anfrage von example.com';
  $message= 'Nachrichten an '.$admin.' von '.$email.":nn";
  foreach($HTTP_POST_VARS as $name=> $value) {
    $message.= "$name:   $valuen";
  }
  mail($admin, $subject, $message, "From: $email");
  header('Location: formok.html');

}
else {

header("location: formnotok.html");

}

?>
Den Code setzt du doch nicht wirklich auf deiner Seite so ein, oder?

bye
arty
darkman
Posts: 104
Joined: 2004-03-24 14:09
 

Re: PHP Formmailer Problem

Post by darkman »

Koenntest Du uns noch bitte die URL zu dem Script nennen?
mir gehn immer so schnell die formmailer aus...

SCNR
outofbound
Posts: 470
Joined: 2002-05-14 13:02
Location: Karlsruhe City
 

Re: PHP Formmailer Problem

Post by outofbound »

Ganz ehrlich:

Ich hab schon schlimmere gesehen. ;)

Die offensichtlichen Lücken sind ja nich drin ;)
arty
Userprojekt
Userprojekt
Posts: 729
Joined: 2002-06-12 10:11
Contact:
 

Re: PHP Formmailer Problem

Post by arty »

OutOfBound wrote:Ich hab schon schlimmere gesehen. ;)
Ich auch, aber nicht viele. :)
OutOfBound wrote:Die offensichtlichen Lücken sind ja nich drin ;)
Ich sehe zB keine Ã?berprüfung, ob die E-Mailadresse korrekt ist.

bye
arty
marcompl
Posts: 10
Joined: 2004-07-09 19:13
 

Re: PHP Formmailer Problem

Post by marcompl »

Metrax wrote:herzlichen dank für diese frage, die wir nun schon mindestens zum 200sten mal beantworten durfen.

MfG
Robert
Sorry :(

Ist das Script wirklich soo "schlimm"?
arty
Userprojekt
Userprojekt
Posts: 729
Joined: 2002-06-12 10:11
Contact:
 

Re: PHP Formmailer Problem

Post by arty »

MarcoMPL wrote:Ist das Script wirklich soo "schlimm"?
ja.

bye
arty
Locked