OK here ir is again and I have added the Mysql_querry to it and it comes up with no errors.
<form enctype="multipart/form-data" method="post" action="<?php echo $PHP_SELF ?>">
Image name (please put a name for your file but leave your clan name at
the begining)<br>
<input type="Text" name="member_pic" size="25" value="<?php echo $UserID ?>">
<br>
<br>
picture<br>
<input type="File" name="picture" size="25">
<br><br>
<input type="submit" name="submit" value="Upload">
</form>
<?php
if ($submit) {
$db = mysql_connect("localhost","username","password");
mysql_select_db("mydb",$db);
$sql = "UPDATE members SET member_pic = '$member_pic' WHERE UserID = '$UserID'";
$result = mysql_query($sql, $db) or die ("Database error: ".mysql_error($db));
exec("cp $picture /home/public_html/images/$member_pic");
echo "member_pic: $member_pic<br>\n";
echo "temp file: $picture<br>\n";
echo "file name: $picture_name<br>\n";
echo "file size: $picture_size<br>\n";
echo "file type: $picture_type<br>\n";
echo "<br>\n";
echo "<img src=images/$member_pic><br>\n";
}
?>
This updloading the file to the site no prob. But is not adding the pic name to the mysql database ?? I just cannot see why.
Lee Smith (Thanks for all the help)