I am currently developing a module that exports user data based on profile fields. I have an admin form section for the user that allows them to select the profile fields they want exported from the user data table. I have a php page that exports data from the database into an excel spreadsheet. So I gues I'm looking for the best way to combine them so that the user enters the data in the form and then the form data is processed and an excel spreadsheet is populated with the relevant information that the user selects. They can then save this to their desktop. Is the best way to include a form in the module and then have an action on the form that uses the function in the included code? are there any good examples out there?
thanks
sarah
Comments
how can you use the settings from the drupal file to access db?
is there an include line that can be used in the top of the php file? hmm
example code
So in this function I have the form submitting to a php file stored in the same directory of the module I am creating. I want to access other database entries in the php file to print to excel. i thought about using javascript but i would prefer to just submit straight to the form that creates the excel spreadsheet: