Page 1 of 1

uploading

Posted: Tue Aug 19, 2008 1:49 am
by suri
how to work with the uploading files ,images and like?

Re: uploading

Posted: Tue Aug 19, 2008 2:46 am
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>