Thanks for the help but I'm not sure where to place that code.
<xyzzy> wrote in message news:6tadnRW5_ojTXlKiRVn-iw@comcast.com...
>
> "Tom Lavier (unmunge email before replying directly)"
> <tlavierSTOP@SPAMsympatico.ca> wrote in message
> news:42Ozb.12723$yd.1800584@news20.bellglobal.com. ..
> > Oops, the correct links are:
> > http://www.romsbytom.com/upload1.php
> > http://www.romsbytom.com/upload2.php
> > http://www.romsbytom.com/php/phpinfo.php
> >
> >
> > "Tom Lavier (unmunge email before replying directly)"
> > <tlavierSTOP@SPAMsympatico.ca> wrote in message
> > news:gcKzb.12529$zf2.1440859@news20.bellglobal.com ...
> > > Hey guys, I am trying to get this script working to upload a file and
it
> > > keeps saying there's an error in copying the file. I've included as
> much
> > as
> > > I can to ask for help here. I've CHMODDED both the upload and files
> > folders
> > > to 777 as well.
> > >
> > > Here's the culprits and a link to my phpinfo file.
> > > http://www.romsbytom.com/upload1.html
> > > http://www.romsbytom.com/upload2.html
> > > http://www.romsbytom.com/php/phpinfo.php
> > >
> > > Finally here is the contents of the upload1.php and upload2.php files:
> > >
> > > upload1.php contents
> > >
> > > <html>
> > > <head>
> > > <title>Upload File</title>
> > > </head>
> > >
> > > <body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#0000ff"
> > > alink="#0000ff"
> > > topmargin="0" marginheight="0">
> > >
> > > <p> </p>
> > > <div align=center width=98%><h3> Upload File</h2><FORM
> > ACTION="upload2.php"
> > > METHOD="POST" ENCTYPE="multipart/form-data">
> > > <CENTER>
> > > <TABLE WIDTH=450 BORDER=0 CELLPADDING=0 CELLSPACING=0 id=news>
> > > <tr><td><b> Name :</b> </td>
> > > <td ><input type="text" name="name" size="40" maxlength="80"
> ></td></tr>
> > > <tr >
> > > <td width=113><b> email : </b> </td>
> > > <td width=289><p><input type=text name="email"
> > size=30>
> > > </td>
> > > </tr>
> > >
> > > <tr >
> > > <td width=113>
> > > <p align=right><b>file to be sent: </b>
> > > </td>
> > > <td width=289>
> > > <p><input type=file name="superdat"
size=30></p>
> > > </td>
> > > </tr>
> > > <tr>
> > > <td colspan=2 align=center><b>Message:</b>
> > > </td>
> > > </tr>
> > >
> > > <tr>
> > > <td colspan=2 align=center>
> > > <textarea name="message" rows="3" cols="40"></textarea> </td>
> > > </tr>
> > >
> > >
> > > </TABLE>
> > > </CENTER>
> > > <DIV ALIGN=CENTER>
> > > <P STYLE="margin-bottom: 0in"><INPUT TYPE=SUBMIT NAME="submit"
> > > VALUE="Upload File"></P>
> > > </DIV>
> > > </FORM>
> > >
> > >
> > > </body>
> > > </html>
> > >
> > >
> > >
> > > upload2.php contents
> > >
> > > <!doctype html public "-//w3c//dtd html 3.2//en">
> > > <html>
> > > <head>
> > > <title>upload</title>
> > > <meta http-equiv="content-type" content="text/html;
charset=iso-8859-1">
> > > </head>
> > >
> > > <body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#0000ff"
> > > alink="#0000ff"
> > > topmargin="0" marginheight="0">
> > >
> > > <?
> > > $mailheaders = "File upload";
> > >
> > > if ($email == "") {
> > > } else {
> > > die("No email address specified.");
> > >
> > > }
> > >
> > > if ($superdat_name == "") {
> > > copy("$superdat",
> > "/home/vidkid72/public_html/upload/files/$superdat_name")
> > > or
> > > die("Couldn't copy file.");
> > >
> > > } else {
> > > die("No input file specified.");
> > > }
> > >
> > > mail("tom@romsbytom.com","$mailheaders", "$email sent $superdat_name,
a
> > > $superdat_size byte file with a MIME type of $superdat_type \n nome
> > :$name\n
> > > message :$message");
> > >
> > > ?>
> > >
> > > <html>
> > > <head>
> > >
> > > <body bgcolor=white text=black link=blue>
> > >
> > > <!--Header/Logo-->
> > > <p> </p>
> > > <p> </p>
> > >
> > > <p align=center><h3>Your upload has been successfully sent and I will
be
> > in
> > > contact with you shortly!</h3></p>
> > >
> > > <p align=center>You have uploaded: <? echo "$superdat_name"; ?>, a <?
> echo
> > > "$superdat_size"; ?>
> > > byte file with a mime type of <? echo "$superdat_type"; ?>.See your
file
> > <a
> > > href="http://www.romsbytom.com\upload/files/<? echo "$superdat_name";
> > > ?>">here</a></p>
> > > </body>
> > > </html>
> > >
> > >
> > > Thanks.
> > >
> > > -Tom
> > >
> > > --
> > > http://www.romsbytom.com
> > > EPROM Programming Service
> > >
> > >
> > >
> >
> >
>
> My last post wasnt complete.
> You must move the file from the tmp location to your home directory
>
>
> <?
> $userfile = $HTTP_POST_FILES[superdat]['tmp_name'];
> $userfile_name = $HTTP_POST_FILES[superdat]['name'];
> $upfile = '/home/vidkid72/public_html/upload/files/ ' . $superdat_name;
> move_uploaded_file($superdat, $upfile)
> ?>
>
>
>
>