i did the tute on that site that whoever supplied a link too and i cant get the code to work right.
CODE
<?
if (!isset($img1)) {
header("Location:
http://www.capty99.com/insert_file.html");
exit;
}
// database configuration
$host = "localhost";
$user = "capty99";
$pass = "$$$$$$";
$db = "capty99";
$binary_junk = addslashes (fread(fopen($img1, "r"), filesize($img1)));
$insert_data = "INSERT INTO
images (img_id, binary_junk, filename, filesize, filetype)
VALUES ('1', '$binary_junk', '$img1_name', '$img1_size', '$img1_type')";
@mysql_query($insert_data) or
die("Couldn't insert data.");
?>
CODE
<HTML>
<HEAD>
<TITLE>Binary Data Insert Form</TITLE>
</HEAD>
<BODY>
<H1>Upload a File:</H1>
<FORM enctype="multipart/form-data"
method="post" action="do_insert.php">
<INPUT type="file" name="img1" size="30">
<INPUT type="submit" name="submit"
value="Use this File">
</FORM>
</BODY>
</HTML>
1st is the php file do_insert.php
2nd is the html file allowing them to upload images
anything wrong with this code?