Richard,
Have you embed the uploader into form tag?
Can you try the following example?
- <?php require_once "phpuploader/include_phpuploader.php" ?>
- <html>
- <head>
- <title>
- Form - Single File Upload
- </title>
- <link href="demo.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
- <div class="demo">
-
- <h2>Single File Upload</h2>
- <p> A basic sample demonstrating the use of the Upload control.</p>
-
-
- <form id="form1" method="POST">
- <?php
-
- $uploader=new PhpUploader();
- $uploader->MaxSizeKB=10240;
- $uploader->MultipleFilesUpload=false;
- $uploader->Name="myuploader";
- $uploader->InsertText="Upload File (Max 10M)";
- $uploader->Render();
-
- ?>
- </form>
-
- <br/><br/>
-
- <?php
- $fileguid=@$_POST["myuploader"];
- if($fileguid)
- {
- $mvcfile=$uploader->GetUploadedFile($fileguid);
- if($mvcfile)
- {
- echo("<div style='font-family:Fixedsys'>");
- echo("Uploaded File:");
- echo("<br/>FileName : ");
- echo($mvcfile->FileName);
- echo("<br/>FileSize : ");
- echo($mvcfile->FileSize);
- echo("<br/>FilePath : ");
- echo($mvcfile->FilePath);
- echo("</div>");
-
- //Moves the uploaded file to a new location.
- //$mvcfile->MoveTo("/uploads");
- //Copys the uploaded file to a new location.
- //$mvcfile->CopyTo("/uploads");
- //Deletes this instance.
- //$mvcfile->Delete();
- }
- }
- ?>
-
- </div>
- </body>
- </html>
asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
asp wysiwyg html editor: http://cutesoft.net/ASP
asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
Live Support: http://cutesoft.net/live-support/default.aspx