answersLogoWhite

0

If you mean uploading files...

HTML Form (front-end):


enctype="multipart/form-data">






PHP (upload_file.php)


if ($_FILES["file"]["error"] > 0)
??{
??echo "Error: " . $_FILES["file"]["error"] . "
";

??}
else
??{
??echo "Upload: " . $_FILES["file"]["name"] . "
";

??echo "Type: " . $_FILES["file"]["type"] . "
";

??echo "Size: " . ($_FILES["file"]["size"] / 1024) . " kB
";

??echo "Stored in: " . $_FILES["file"]["tmp_name"];
??}
?>

Thank You Google & w3schools (http://www.w3schools.com/php/php_file_upload.asp)
User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

How do you install PHP scripts?

You need to upload the scripts to web hosting space that support PHP.


Can you sen a code to upload photo in javascript or 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.


How do you upload an image to MySQL using PHP?

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


How does PHP function in applications?

in php used for one typ website


How do you use settime out in php?

we cant use set timeout function in php because it is of java script function


How do you return a value in a PHP function?

Below is a simple example of how you could return a value in a PHP function. <?php function returnme($value) { return $value; } echo returnme('hello'); // outputs: hello ?>


What is the way to create a function in PHP?

function function_name() { .................... }


What does the php function eval?

The eval() function evaluates a string as PHP code. http://us.php.net/manual/en/function.eval.php


How do you use a function with a button in PHP?

A simple function call <html> <body> <?php if(isset($_POST['button'])) { setValue(); // Function is called } function setValue() { echo "<br>The button property to call PHP function works"; // Your code here } ?> <input type="submit" name="button" onclick=<?php $_SERVER['PHP_SELF']; ?> /> </body> </head>


How do you create a PHP script?

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.


How do you change the current directory in PHP?

chdir() PHP function helps in changing the current directory.


What is the getopt function in PHP?

It gets options from the command line argument list. It can be used in PHP 4.3 and above, including PHP 5.


How do you edit a PHP file?

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


What is header in php?

header() is a php function used to modify and set HTTP headers sent to the browser.


How can files be converted into HTML using PHP?

To rename a file in PHP the easiest way to do it is to use the rename() function. <?php rename("before.txt", "after.html"); ?>


How do you create a web mail script using PHP?

You can use phpMailer() Or, you can use mail() PHP function to send emails via PHP script.


How do you include a file in PHP?

To include a file in PHP all you need to do is use the include() function as I have shown you in the example below. <?php include("filename.php"); ?>


How do you find out the number of arguments passed to a function in PHP?

With a call to the function func_num_args().


What lines of code make up a function in php?

A user defined function in PHP is set up of several key components.First, the function keyword; this lets PHP know that you're setting up a function. Then the function name, which lets you later use your function. After that, the parametersthe function requires to operate. Finally, just the bracketssurrounding your function, setting it apart from the rest of your code.function nameHere ($parameterOne, $parameterTwo) {functionCodeHere();}


Why php not able to fetch the image from 'My Picture' in win XP to Script and diplay it?

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.