Re: Re: More upload Problems

From: Date: Fri, 20 Jul 2001 09:48:52 +0000
Subject: Re: Re: More upload Problems
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-58870@lists.php.net to get a copy of this message
"Peter Clarke" <peterNO@SPAMjingo.com> wrote in message news:20010720094707.2700.qmail@pb1.pair.com... > > "Jason Rennie" <jwrennie@bigpond.com> wrote in message > > news:Pine.LNX.4.21.0107200048150.4402-100000@snuggles.fuzz.net.au... > > > > > Here is the total chunk of code to date. > > > > It does currently work, except for the file submission complaining about > > the no file uploaded. > > > > the current fragment of code to do with file submission is simply my > > efforts to get the script to say that a file is being successfulyl > > uploaded. > > > > Jason > > > > > > <?php > > > > > > if(is_uploaded_file($userfile)) > > { > > move_uploaded_file($userfile,"/tmp"); > > } > > else > > { > > echo "No file Uploaded"; > > > > } > > > > > > // now to provide an assignment submission box > > print "<P>"; > > print "<FORM ENC_TYPE=\"multipart/form-data\" > ACTION=\"$param&upload=true\" METHOD=\"post\" >\n"; > > print "<INPUT TYPE=\"hidden\" NAME=\"MAX_FILE_SIZE\" > VALUE=\"1048576\">\n"; > > print "<H4>Submit A File</H4><P> "; > > print "<INPUT TYPE=\"file\" NAME=\"userfile\" > > >\n<P>"; > > print "<INPUT TYPE=\"submit\" VALUE=\"Upload\">\n"; > > print "</FORM>"; > > > > > > > > ?> > > > > > Try a simple script that tests just file uploads, without all the other > stuff getting in the way. For your ACTION in the form just point it to: > $HTTP_SERVER_VARS['PHP_SELF'] > You seem to have a GET request in the ACTION and a POST in the form, not > sure if that'll be a problem. > > Peter > > > Just seen you've got it fixed. Peter

« previous php.general (#58870) next »