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 Harish Chauhan  >  upload.inc.php  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example File
Class: upload.inc.php
Validate and manage files uploaded via Web forms
Author: By
Last change:
Date: 2004-12-20 23:30
Size: 931 bytes
 

Contents

Class file image Download
<?php

    
include_once("upload.inc.php");

    if(isset(
$_POST['submit']))
    {
        
$myUploadobj = new UPLOAD//creating instance of file.
        
$upload_dir="images";
        echo 
"<br>";
        
// use function to upload file.
        
$file=$myUploadobj->upload_file($upload_dir,'file',true,true,0,"jpg|jpeg|gif"); 
        if(
$file==false)
            echo 
$myUploadobj->error;
        else
            echo 
"File Name : ".$file;    
        echo 
"<br>";
    }

?>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style>
a {  font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: bold; color: #008080; text-decoration: none; font-size: 12px;}
</style>
</head>

<body bgcolor="#FFFFFF" text="#000000">
<form name="test" method="POST" action="" enctype="multipart/form-data">
<input type="FILE" name="file">
  <input type="SUBMIT" name="submit" value="submit">
</form>
</body>
</html>