[php] sending variables to mail

[php] sending variables to mail

Frans A. Sanders fsanders_(at)
Sat, 29 Jul 2000 11:58:10 +0200

Hello everyone....

Somebody made me a script to send ALL variables from an input form to EMAIL.

But now I want only a few SPECIFIC fields send. So I won't get all the junk
I don't need inside the mail. Somebody who can tell me how I change this

Frans (The Netherlands)

# the main loop, assuming all errors got trapped above.

    while(list($key, $val) = each($HTTP_POST_VARS))

              $message .=  "$key: $val\n";

while(list($key, $val) = each($HTTP_GET_VARS))

              $message .=  "$key: $val\n";
    mail( "$to",  "$subject",  "$message", "From: $from");

      if ($nextpage) {
        header( "Location: $nextpage");

    else     {  // The default confirmation, just in case.
        echo  "Thank you. Your message was sent successfully!";


php::bar PHP Wiki   -   Listenarchive