please have a look at this where am I going wrong ?? Its is not updating the Mysql file and not updloading the file ??
UserID would = any name
<form enctype="multipart/form-data" method="post" action="<?php echo $PHP_SELF ?>">
picture name (please put a name in for your file but leave your clan name at
the begining)<br>
<input type="Text" name="member_pic" size="25" value=http://www.phpbuilder.com/board/archive/index.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","pass");
mysql_select_db("mydb",$db);
$sql = "UPDATE members ";
"SET member_pic ='$member_pic'";
"WHERE UserID = '$UserID'";
exec("cp $picture /home/localhost/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=http://www.phpbuilder.com/board/archive/index.php/images/$member_pic><br>\n";
}
?>
UserID would = any name
<form enctype="multipart/form-data" method="post" action="<?php echo $PHP_SELF ?>">
picture name (please put a name in for your file but leave your clan name at
the begining)<br>
<input type="Text" name="member_pic" size="25" value=http://www.phpbuilder.com/board/archive/index.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","pass");
mysql_select_db("mydb",$db);
$sql = "UPDATE members ";
"SET member_pic ='$member_pic'";
"WHERE UserID = '$UserID'";
exec("cp $picture /home/localhost/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=http://www.phpbuilder.com/board/archive/index.php/images/$member_pic><br>\n";
}
?>