$RENDENGINE->render($rendlist); ?> <input name="files" type="file" accept="image/*"> <div class="form-group"> <button type="submit" class="btn" value="Submit">Submit</button> </div> </form> <?php if (isset($_POST) && !array_diff($post_array, array_keys($_POST))) { $SANTIZER = new InputSanitizer($_POST); $SANTIZER->addFilter("about", FILTER_SANITIZE_STRING); $sant_arr = $SANTIZER->filter(); /* We will not worry about deleting the old image for now. Should be implemented later, however. */ $connection2 = $DB->connect(); if ($avatar_img != null) { require $_SERVER['DOCUMENT_ROOT'] . "/Common/ImageManager/useravatar.php"; $img_mang = new UserAvatar($avatar_img); $ava_path = $img_mang->createImage($USERSESS->getUserID()); (new sqlDBExecute($connection2, "UPDATE USERINFO SET About = \$1,AvatarPath = \$2 WHERE UserID = \$3", array($sant_arr[0], $ava_path, $USERSESS->getUserID())))->execute(); } else { /*Redundent for now*/ (new sqlDBExecute($connection2, "UPDATE USERINFO SET About = \$1 WHERE UserID = \$2", array($sant_arr[0], $USERSESS->getUserID())))->execute(); } } ?>