RE: [PHP] XML inside a file
| From: | Eric Dawson | Date: | Sun, 09 Jul 2000 02:25:32 +0000 |
| Subject: | RE: [PHP] XML inside a file | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-5576@lists.php.net to get a copy of this message | ||
thanks. sorry about that. will do.
The mail part is already working. But we have 12 new variations of forms
being posted a month, so I want to be able to cycle through the
$form.varnames in my email. rather than explicitly coding the $varname for
each form variation.
in cold fusion it codes like this:
<cfset mymessage = "">
<cfloop index="fieldname" list="#form.fieldnames#">
<cfset mymessage = mymessage & chr(13) & "#fieldname#:
#evaluate('form.#fieldname#')#">
</cfloop>
<cfmail>mymessage</cfmail>
Thanks
Eric
-----Original Message-----
From: Evan Raskob [mailto:esr9@cornell.edu]
Sent: Sunday, July 09, 2000 12:05 AM
To: eric@alivenewmedia.mb.ca
Subject: Re: [PHP] XML inside a file
Not sure what you mean, and I think you probably wanted to reply to the
php-general list rather than emailing me, but here goes.
Php registers the post variables according to their name ($varname), so you
just have to concatenate the post (or get) variables and use the mail()
function to mail them. you can check www.php.net for the exact mail
syntax, i forget it offhand.
-Evan
At 08:55 PM 07/08/2000 -0500, you wrote:
>I need to dump the contents of a form to an email. I know how to do it in
>cold f=usion, but not php3.
>
>Any help?
>
>Eric
>
>
>From: Evan Raskob <esr9@cornell.edu>
>To: php-general@lists.php.net
>Subject: Re: [PHP] XML inside a file
>Date: Sat, 08 Jul 2000 20:33:20 -0700
>
>Sorry, that was a stupid question in retrospect. Of course you can use
>Php's XML parser on just part of a file.
>
>>At 05:56 PM 7/8/00 -0700, Evan Raskob wrote:
>>>This might be a dumb question, but I'm new to XML so here goes -
>>>
>>>I read Justin Grant's great article on XML in Php
>>>(http://phpbuilder.com/columns/justin20000428.php3?page=1), but I'm
>>>wondering if you can just parse a section of a page, instead of the whole
>>>thing - so you would have a php script, and it would draw some
>>>XML-formatted text out of a database and then parse it and spit it out
>>>into the middle of an HTML page. Is this possible, or is this bad design
>>>with XML? (I know that I can just use string parsing functions to
>>>properly parse my XML stuff, but I want to play with Php's built-in
>>>functions)
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
>For additional commands, e-mail: php-general-help@lists.php.net
>To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>
>________________________________________________________________________
>Get Your Private, Free E-mail from MSN Hotmail at
>http://www.hotmail.com