I have a php page which shows an entire time schedule for a user in html table format.
this page is generated when the user is selected from a drop down and a search is run
Now, I would like the functionality for this entire page to be emailed to the user when a button is clicked
user’s email address is stored in a mysql information table and all users have a primary user_id associated with them
I am looking for a script which allows a page to be emailed, along with some text content. the script will also retrieve the email address of the user from database
How can this be done?
UPDATE: I FOUND AN EASY WAY, ON THE PHP PAGE WHERE THIS SCHEDULE IS SHOWN IN TABLE FORMAT, I POSTED A LINK TO ANOTHER PHP PAGE.
WHEN CLICKED IT RETRIEVES THE SAME DATA FROM DATABASE, ALONG WITH EMAIL ADDRESS OF USER (BASED ON USER_ID STORED IN SESSION VARIABLE) AND EMAILS THE ENTIRE DATA IN PROPERLY FORMATTED HTML TABLE FORMAT TO THE USER.. HOPE THIS HELPS SOMEONE ELSE LOOKING FOR SIMILAR FUNCTIONALITY
You can use file_get_contents() to make a request for the page you want, and then email it.