you are binding to the image column using the post:
$memimage = $_SESSION['memimage'] = trim($_POST['memimage']);
there are 2 problems here:
1) This code comes be fore the code to upload the file.
2) You should be binding to the server file name biding in the WA Uploaded files group instead of using the post.