NYCPHP Meetup

NYPHP.org

[nycphp-talk] POST to mail

Bhulipongsanon, Pinyo Pinyo.Bhulipongsanon at usa.xerox.com
Fri Jun 20 10:40:18 EDT 2003


The "at" symbol is just to ignore error messages if the server does not
support mail() function.

A little upgrade:
 	foreach (array_keys($_POST) as $key ) { $mailBody .= "$$key =
$_POST[$key]\
"; }
 	@mail($admin_email, $email_title, $mailBody, $optional_header);

Add spaces in first line between equal symbol.

-----Original Message-----
From: Christopher Hendry [mailto:chendry at nyc.rr.com]
Sent: Thursday, June 19, 2003 6:43 PM
To: NYPHP Talk
Subject: RE: [nycphp-talk] POST to mail


ooh, if we can get it to one line, I'll give you a nickel.  :)

what's the '@' do?

- C

-> -----Original Message-----
-> From: Bhulipongsanon, Pinyo [mailto:Pinyo.Bhulipongsanon at usa.xerox.com]
-> Sent: Thursday, June 19, 2003 5:47 PM
-> To: NYPHP Talk
-> Subject: RE: [nycphp-talk] POST to mail
-> 
-> 
-> just 2 lines:
-> 
-> 	foreach (array_keys($_POST) as $key ) { $mailBody .=
-> "$$key=$_POST[$key]\
"; }
-> 	@mail($admin_email, $email_title, $mailBody, $optional_header);
-> 
-> Enjoy :-)
-> 
-> -----Original Message-----
-> From: Christopher Hendry [mailto:chendry at nyc.rr.com]
-> Sent: Thursday, June 19, 2003 2:30 PM
-> To: NYPHP Talk
-> Subject: [nycphp-talk] POST to mail
-> 
-> 
-> Anyone know a quick and painless way I can dump POST vars into a 
-> format that
-> will be somewhat readable to the layperson receiving it via the mail()
-> function?
-> 
-> Thanks.
-> Chris
-> 
-> 
-> 
-> 
-> 
-> 
-> 
-> 
-> 
-> 
-> 



--- Unsubscribe at http://nyphp.org/list/ ---




More information about the talk mailing list