Howdy, all! 😃
Quick, quick background before jumping in . . . I've been receiving PHP tutoring since January, allowing me to implement a number of time-saving PHP-based event-entry systems for my company's websites.
Staffers can enter an event's title, start date, end date, and details through a form. The events are displayed on the website once their active date is reached, then deleted when they expire.
An audit file running daily at 12:01 am through a cron job deletes outdated events from the table, and sends me an e-mail.
Within the e-mail, I've always been able to display any part of the record, like the title, dates, or details . . . but the mail comes through as HTML, and thus, the details are formatted.
What I'd like to be able to do is have the contents of the entire record output in the e-mail raw, like a table dump: on one line, with apostrophes and quotes escaped, and returns converted to \n thingies.
ie INSERT INTO events VALUES (id, 'title', 'details_line_1\r\n\r\n<strong>details_line_1</strong>', 7, 28, 2003, 8, 12, 2003);
I'd like this safeguard in place on the off chance (okay, not that off -- it's happened a number of times) that an incorrect expirey date is set, or an event is accidentally deleted manually.
Is there any way to output the contents of a record in an e-mail, just like I see it when I do a table dump from phpMyAdmin (2.26, running with MySQL 3.23.51 on a Unix server)?
Thanks every so kindly in advance. I look forward to any thoughts that can be offered, and offering anything my six months of PHP-ness can help with. 🙂