Okay, so here's what I have.
User makes changes to a form and the data gets sent to a page. This data is an update of data already in a mysql table row.
So, I can make an array of previous data using mysql_fetch_array(), and I have the array of the $_POST data.
What I want to do is compare the data made by mysql_fetch_array() and $_POST to generate an email highlighting changes that were made. The end result would equate to a whole bunch of these, but basically with one loop:
if ($previous_array[$field] !== $_POST[$field]) {
echo "<font color="red">This value changed</font>";
} else {
echo "Original data outputs here";
}
I realize there's probably a bunch of different ways of doing this, but I'm looking for the easiest most concise way of doing it so I can basically move this loop around in other programs for an easy fix.
Thanks for any help with this!