the trouble Im having has to be the html for the form, which does all steps.. basically a form, uploads the image to Filesystem and the 20+ other text fields and image information to the database.
How would I alter my code to only upload the image itself to filesystem and keep the other fields uploading to my database??
include "/dyuiyuiy.php";
if(isset($POST['upload']) && $FILES['userfile']['size'] > 0)
{
$fileName = $FILES['userfile']['name'];
$tmpName = $FILES['userfile']['tmp_name'];
$fileSize = $FILES['userfile']['size'];
$fileType = $FILES['userfile']['type'];
$fp = fopen($tmpName, 'r');
$content = fread($fp, filesize($tmpName));
$content = addslashes($content);
fclose($fp);
if(!get_magic_quotes_gpc())
{
$fileName = addslashes($fileName);
}
$query = "INSERT INTO upload (name, size, type, content, pageid, Model, Make, Price ) ".
"VALUES ('$fileName', '$fileSize', '$fileType', '$content', '$pageid', '$Model', '$Make', '$Price')";
mysql_query($query) or die('Error, query failed');
echo "<br>File $fileName uploaded<br>";
}
<form name="formCheck" action="" method="post" enctype="multipart/form-data">
..