NYCPHP Meetup

NYPHP.org

[nycphp-talk] POST to mail

Christopher Hendry chendry at nyc.rr.com
Thu Jun 19 21:41:52 EDT 2003


LushMEDIA is over now (so you know what that means) - so I'm going to test
this later... but you've earned it if it works.  ;)

C

-> -----Original Message-----
-> From: Daniel Kushner [mailto:nyphp at websapp.com]
-> Sent: Thursday, June 19, 2003 8:36 PM
-> To: NYPHP Talk
-> Subject: RE: [nycphp-talk] POST to mail
->
->
-> Chendry,
->
-> You really like to push PHP to the limits! You owe me a nickel:
->
-> mail($admin_email, $email_title, is_array($_POST) && count($_POST) > 0 ?
-> call_user_func_array(($foo = create_function ('$vars, $vals, $ind, $foo',
-> 'if(count($vals) == ($ind+1)) return "$vars[$ind] => $vals[$ind]"; else
-> return "$vars[$ind] => $vals[$ind]\
".$foo($vars, $vals, ++$ind,
-> $foo);')),
-> array(array_keys($_POST), array_values($_POST), 0, $foo)) : 'Empty',
-> $optional_header);
->
->
->
-> > -----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