Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of ashwin suresh morey  >  fileUp  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: usage of class file
Class: fileUp
Manage image uploads
Author: By
Last change:
Date: 2005-11-21 01:16
Size: 890 bytes
 

Contents

Class file image Download
<?php
require("fileUpload.php");
if(
$_POST['submit']){
  if(!
is_array($HTTP_POST_FILES['file1'])){
    echo 
"no file uploaded";
  }
  else{
    
$upImage = new upload($HTTP_POST_FILES['file1']['name'],
    
$HTTP_POST_FILES['file1']['tmp_name'],$HTTP_POST_FILES['file1']['size'],images);
    
$upImage->fileUp();
  }
}
?>
<html>
    <head>
    </head>
<body>
        <form name="form1" action="example.php" method="post" enctype="multipart/form-data">
        <table>
            <tr>
                <td></td>
            </tr>
            <tr>
                <td><input type="file" name="file1"></td>
            </tr>
            <tr>
                <td><input name="submit" id="submit" type="submit" value="submit"></td>
            </tr>
            <tr>
                <td></td>
            </tr>
        <table>
        </form>
    </body>
</html>