I now have a new problem. I took care of the issue regarding the fread and invalid stream resource thing, but now for whatever reason, it STILL won't upload. The die() message appears whenever I try to upload. Here's my code:
<?php
$username = $_POST['session'];
$session = $_SESSION['User']['UserName'];
if ($submit) {
if ($username == $session) {
If($Picture != "none") {
$HeadShot = addslashes(file_get_contents($_FILES["Picture"]['tmp_name'][0]));
mysql_query("INSERT INTO Member (loginName,Image) VALUES ('$username','$HeadShot')") or die("Can't Perform Query, $username");
}
}
else {
echo "You did not upload any picture or you are not logged in.";
}
}
?>
NEW DETAILS. IMPORTANT! Now, it works when I've deleted all but one row, but when there is more than two, it won't upload. This is very confusing.