uploading

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
suri
Forum Newbie
Posts: 1
Joined: Tue Aug 19, 2008 1:43 am

uploading

Post by suri »

how to work with the uploading files ,images and like?
User avatar
it2051229
Forum Contributor
Posts: 312
Joined: Tue Dec 25, 2007 8:34 pm

Re: uploading

Post by it2051229 »

Code: Select all

 
<?php
      if(isset($_POST["upload"]))
      {
            $tmpName = $_FILES["image"]["tmp_name"];
            $imageName = $_FILES["image"]["name"];
            
            move_uploaded_file($tmpName, "to my <span style='color:blue' title='I&#39;m naughty, are you naughty?'>smurf</span> directory/".$imageName);
      }
?>
<html>
<form method='post' action='<?php $_SERVER["PHP_SELF"] ?>' enctype='multipart/form-data'>
<input type='file' name='image' />
<input type='submit' name='upload' value='Upload the <span style='color:blue' title='I&#39;m naughty, are you naughty?'>smurf</span> game' />
</form>
</html>
 
Post Reply