Heres a form and the PHP behind it I use:


<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080">
<form enctype="multipart/form-data" action="addpic.php" method="post">
<input type="hidden" value="$com_num" name="com_num">
Pic to Upload(Only .jpg and .gif files)
<p><input name="userfile" type="file">
<input type="submit" value="Send File">

<---PHP FILE--->
if (is_uploaded_file($userfile)) {
 copy($userfile, "location/");
}} else {
    echo "That diddn't work!";
header ("Location:";);

I do much more with it (resize and edit images etc etc) but thats the basic layout...


Reply via email to