this is file of index.php or any file that contains uploading area .......
....................................................................................
<body>
<form name="frmFile" method="post" action="fileuploadprocess.php" enctype="multipart/form-data">
<label>Select File</label>
<input type="file" name="flnFile" />
<br />
<input type="submit" value="Upload File" />
</form>
</body>
.....................................................................................................
fileuploadprocess.php that is in form action="fileuploadprocess.php"
<?php
//print_r($_FILES);
//echo(phpinfo());
$sType=$_FILES['flnFile']['type'];
echo($sType);
//echo("<br>");
$arrFileTypes=array("image/jpeg","image/png","image/gif");
$iFileSize=$_FILES['flnFile']['size'];
// For KBs
$iFileSize=$iFileSize/1024;
// For MBs
//$iFileSize=$iFileSize/1024;
echo($iFileSize);
echo("<br>");
//if($sType=="image/jpeg" $sType=="image/png" //$sType=="image/gif")
if($iFileSize<=100)
{
if(in_array($sType,$arrFileTypes))
{
$sDirectory="Uploadfiles/sajid";
if(is_dir($sDirectory))
{
}
else
{
mkdir($sDirectory,0777);
}
$dDateTime=date('mdyhis');
$sTempLocation=$_FILES['flnFile']['tmp_name'];
//$sDesignationLocation="Uploadfiles/".$dDateTime.$_FILES['flnFile']['name'];
$sDesignationLocation=$sDirectory."/".$dDateTime.$_FILES['flnFile']['name'];
//echo($sDesignationLocation);
move_uploaded_file($sTempLocation,$sDesignationLocation);
}
else
{
echo("File type error");
}
}
else
{
echo("File size Error");
}
?>
You need to upload the scripts to web hosting space that support PHP.
If you mean uploading files...HTML Form (front-end):Filename:PHP (upload_file.php)Thank You Google & w3schools (http://www.w3schools.com/php/php_file_upload.asp)
PHP is a recursive acronym for "PHP: Hypertext Preprocessor" created by The PHP Group. PHP is a widely used server-side scripting language and the general purpose of PHP is to create dynamic Web Pages. For more information, visit the PHP website.
"PHP: Hypertext Preprocessor".
< ?php // This is an example of comment in PHP /* This is another example of comment in PHP and we can write comments in multiple lines using this method */ ? >
You need to upload the scripts to web hosting space that support PHP.
Please go to www.google.com, and search for "php upload photo script" or something alike. I'm sure you'll find somthing there.
You cant upload an actual picture to MySQL, you can upload the URL but not the picture itself. You would have to upload this to your site first and then send the link to MySQL
To create a PHP script all you have to do is create a new file, then save the file as "filename.php". It must have a .php file extension.After that open the file and put in the PHP tags like shown.Then you write your PHP script within those tags and upload to your web space and check it out.
Open it in Notepad. Add or remove whatever code you want. To test, you will have to upload it to a PHP enabled webhost, or you will need to install MySQL, PHP, and Apache on your computer. Use Editor to edit the PHP file. Example: Notepad++ , editplus ,Zend IDE ,Netbeans IDE
PHP is a server-side language, and doesn't have access to your hard-drive. You have to get the user to upload the picture to the server, first.
You upload the image in HTML using a form that includes the following field <input type="file" name="fileUpload" /> After the form is submitted, you can access it with the $_POST variable as $_POST['fileUpload'] http://www.tutorialsscripts.com/free-php-scripts/file-and-directory-script/image-upload.php
The easiest way is to create a file with a name ending in .php (such as info.php), containing only these 3 lines: <? phpinfo(); ?> Upload this file to your web space and access it using your browser. It will show a lot of information about your webserver and the php version running on it.
Well assuming they allow PHP, all you would have to do is upload the file to your web space and then visit the page in your web browser. Apart from that there's not much else too it.
It is possible to have an image upload object. You will simply create a class that takes the parameters required for an upload and pass it the upload resource given by the relevant $_FILES[''] superglobal. For instance one could use code like the following when calling this class: // Give the constructer the directory $uploader = new Upload("../galleryimages"); into which to upload. // The rest of the params. $notice = $uploader->uploadimage($_FILES['fileupload'], UPLOAD_TYPE_IMAGES, 220, 188, UPLOAD_KEEP_ASPECT);
You will need to use a script such as PHP or ASP for uploading purposes. You can use an anchor tag for downloading:right click and choose 'save as' to download
Answer: Php 2510% of Php 250= 10% * Php 250= 0.10 * Php 250= Php 25