Image

Imagelrdjester wrote in Imagephp 🤔curious

Forms question...

First off, let me say, "hello". I just joined this community.

I work as a webmaster/DBA sat Everett Community College in Washington State. The setup is IIS 5.0/ColdFusion 5 with SQL Server 2000 backend.

I work on PHP in my spare time and am just learning.



I just got a client who had a previous site that is done in ColdFusion. There is no real reason for CF as there is no database. However, the concept works. I am looking to convert to PHP so I can host it on my servers. However, there is one thing that is being done that I am not sure how, or even if, it can be done in PHP similarly. There are several forms and they all are using a simple action file to e-mail the results.

Here is what is happening:

Form is submitted via post to send.cfm

Send reads in the variable form.formfields (just like $_POST)
Then it loops through and grabs one field name at a time (disregarding the value) and assigns it to a variable
Then it outputs the field name and then using the evaluate function, evaluates that field name and out puts it.

Not the prettiest output, but it serves its purpose.

Other than writing a split routine, is there any way to accomplis the same thing? Can the field names be pulled out without knowing and explicitly calling them?



TIA