If you only want to show the ones variables that have values input by the user, you could do this with the while loop:
while (list($var, $val) = each($HTTP_POST_VARS)) { if ((strlen($val) > 0) && ($var !="email") && ($var !="SUBMIT") && (isset($var)) { $message .= "$val $var were ordered \n"; } } This will make sure that the string length of $val (the value of the form element) is greater than 0; if not, it won't add it to the message. Joshua Hoover > It works after modifying it a little. BUT... :) It lists all the > variables > even if they aren't given any value. Is it possible to only get the > defined > ones? > > Regards Raymond > > > "Matthew Luchak" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > how about... > > > <? > $message=""; > $header="From: $email"; > $to="[EMAIL PROTECTED]"; > $subject="burger me"; > > while(list($var, $val) = each($HTTP_POST_VARS)) > { > if(($var !="email")&&($var !="SUBMIT")&&(isset($var)){$message > .="$val $var were ordered \n";} > } > > MAIL( > "$to", > "$subject", > "$message", > "$header" > ); > ?> > ____________________________ > Matthew Luchak > Webmaster > Kaydara Inc. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]