What is my friend doing wrong? On control panel.. "Could not update profile." http://prntscr.com/rqmx5
At a glance if $_POST['state'] is not sent or empty, your code goes to }else{ Could not update... Maybe try: if ($id) instead
if (isset($_POST['state'])) { Code (markup): Try that, if not, try echoing out each of the variables to make sure the data is set. Failing that, echo out the query and run it through PHPMyAdmin manually, that will tell you if there's an error with the query.
The problem is that POST['state'] is not set/not being passed into that page. You need to make sure that you pass that in from an HTML form or something similar.