Why do I get that error message when trying to use this code (NOTE: The following names for the mysql database are made up for security reasons):
<?php
if ($submit) {
include "db_connect.php";
$name = $_POST['name'];
$year = $_POST['year'];
$PSize = filesize($Picture);
$mysqlPicture = addslashes(fread(fopen($Picture, "rb"), $PSize));
mysql_query("INSERT INTO profileinfo (Name,Picture,Year,id) VALUES ('$name','$mysqlPicture','$year','')") or die("Can't Perform Query, $username");
echo "Thank you, $name. Your profile info was added to the yearbook.<br><a href=\"http://apps.facebook.com/carmelhighyearbook\">Click here to go back</a>";
}
else {
echo '<h1>Add yourself</h1><form action="add.php" method="POST" enctype="multipart/form-data"><input type="text" name="name" value="Your full name"><br><input type="text" name="year" value="Class (Year)"><br><b>Picture:</b> <input type="file" name="Picture"><br><input type="submit" name="submit" value="Submit"></form>';
}
?>
Thanks.