OK, I'm a newbie but I can seem to find the answer. I may be searching for the incorrect term.

I have a form in block on the right (http://besthealthrateskc.com/?q=node/1). What’s the process of getting the form results on this page: http://besthealthrateskc.com/?q=node/7 (right new it's just HTML but I need to pull the data from a data file) . The question is “How do you include raw PHP code on a page such as the previous example.”

Any help or suggestions will be greatly appreciated.

Comments

davedelong’s picture

There have been a couple threads in the last day or two regarding how to include PHP code in a page. I suggest you go look for those. =)

Dave

WorldFallz’s picture

...but I need to pull the data from a data file...

You mean like a flat file? Is there any reason you can't, or don't want to, create a content type for "carriers" and store a node (with those fields from the table as cck fields in the content type) for each carrier in the db?

Then you could easily use the views module with exposed filters to set up a block or query page and pull the data from drupal dynamically... probably without writing a single line of php code.

The question is “How do you include raw PHP code on a page such as the previous example.”

That's simple-- just type it in (you'll need the php filter module enabled, and the php code input format selected).

Or do you mean, what php code do you need to do this? That's more complex... for that you'll have to learn how to open and parse a file with php and feed those results in the proper format to the theme_table function.

===
"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime."
-- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz

focused’s picture

php filter module was the answer I was looking for.