I\'m really new in PHP and HTML. After pressing the submit button I\'m trying to populate the fields with the data that is already in the Users MySQL table (this works). I also
You are overwriting the variable $query with a new value instead of performing the query first. That said though your code has numerous problems:
$_POST['user_id'], please read up on SQL injection attacks.See the rewritten code below.
PHP FIND DATA