Ofcourse, and thanks for helping

This is what the Javascript string / HTML end up looking like:
<form id="file_upload_form" method="post" enctype="multipart/form-data" action="upload_avatar.php?user_id="+user_id+">
<table width="500" cellpadding="3" cellspacing="2">
<tr>
<td><h4>Update Your Avatar (Icon)</h4></td>
</tr>
<tr>
<td><input name="file" id="file" size="27" type="file" /><br /><br /></td>
</tr>
<tr>
<td><input type="submit" name="action" value="Update Avatar" /></td>
</tr>
</table>
</form>
upload_avatar.php, the action, looks like this, for example:
upload_avatar.php?user_id=1
The actual PHP file upload_avatar.php looks like this:
<?php
$user_id = $_GET['user_id'];
echo $user_id;
move_uploaded_file($_FILES["file"]["tmp_name"], './avatars/' . $_FILES["file"]["name"]);
?>
If I try to do this ===> $user_id = $_GET['user_id'] <=== the php crashes, without errors.
I think this has something to do with the enctype, because it is set to 'multipart/form-data'.
Any ideas?