Create a custom cancel button -- PHP File Upload

php Uploader

PHP File Uploader

Create a custom cancel button

There are two simple steps to create a custom cancel button:

  1. Create a HTML button or image button which will be used as custom cancel button.
  2. Use the CancelButtonID property to specify the ID of the control that will be used as the cancel button.

Example:

  1. //Step 1: Register Uploader component to your page   
  2. <?php require_once "phpuploader/include_phpuploader.php" ?>   
  3. <html>   
  4. <body>   
  5.         <form id="form1" method="POST">   
  6.             <?php   
  7.                 //Step 2: Create Uploader object.   
  8.                 $uploader=new PhpUploader();   
  9.                 //Step 3: Set a unique name to Uploader   
  10.                 $uploader->Name="myuploader";    
  11.                 //Step 4: Specify ID of the control that will be used as cancel button.   
  12.                 $uploader->CancelButtonID="cancelbutton";   
  13.                 //Step 5: Render Uploader   
  14.                 $uploader->Render();   
  15.             ?>   
  16.             <img id="uploadercancelbutton" style='display:none;' alt="Cancel" src="sampleimages/cancel_button.gif" />   
  17.         </form>   
  18. </body>   
  19. </html>