Hello, I want to display the fields that were updated.

When a user edits their information, example;

  "FIRST NAME:John
    LAST NAME: Stih

    Update to:UPDATE users SET firstname = '$firstname', lastname = '$lastname'

    FIRST NAME: John
    LAST NAME: Smith

I would want it to print

"You updated your Last name"

What do you have so far?

Just the UPDATE and SET query.

$firstname = mysql_real_escape_string(trim(stripslashes($_POST['firstname'])));
$lastname = mysql_real_escape_string(trim(stripslashes($_POST['lastname'])));

$query = "UPDATE users SET firstname = '$firstname', lastname = '$lastname';
    if (mysql_affected_rows() == 1) {
    print '<p>Your info has been updated.</p>';}
    else{ print "Didn't Update";}

You just need PHP code to compare the old values with the new ones.