Yes I'm trying tp upload a file. Here's the HTML code;
html>
<head>
<title>Upload Your Photos</title>
</head>
<body>
<h2>Upload Your Photos</h2>
<form enctype="multipart/form-data" method="post" action="mypicts1.php">
<input type="file" name="userfile" size="30">
<br><br>
<input type="submit" name="submit" value="Send this file">
</form>
</body>
</html>
------------------------Here's the php code from another file----------
<?php
$conn=mysql_connect("localhost","chelsea",""

or die("Could not connect " . mysql_error());
mysql_select_db("mylogin",$conn) or die("Could not select database"

;
$uploaddir = 'c:/mysql/data/mylogin/upimages/';
print "<pre>";
if (!copy($_FILES['userfile']['tmp_name'], $uploaddir . $_FILES['userfile']['name'])) {
print "File is valid, and was successfully uploaded. Here's some more debugging info:\n";
print_r($_FILES);
$sql="INSERT INTO myimagexx (imagefilepath) VALUES ('image015.jpg')";
$result=mysql_query($sql, $conn) or die(mysql_error());
echo $result;
//mysql_select_db("mylogin",$conn) or die("Could not select database"

;
} else {
print "Possible file upload attack! Here's some debugging info:\n";
print_r($_FILES);
//$conn=mysql_connect("localhost","mkt2000","chelsea7"

//or die("Could not connect " . mysql_error());
$sql="INSERT INTO myimagexx (imagefilepath) VALUES ('$uploaddir')";
$result=mysql_query($sql, $conn) or die(mysql_error());
print $result;
mysql_select_db("mylogin",$conn) or die("Could not select database"

;
}
?>
What I'm trying to do is upon the selection of the file in the HTML code, Take the name of the file and insert it into the MYSQL database. This way when the record is queried, the filename of the image can be retrieved and displayed in an HTML or PHP file.
I can do the latter part. All I need to know how to do is talking the user's selection and inserting it into the database.
Thank you,
KJ