Upload profile picture using php

Alright i have a script for you man and Good luck on your site, im creating something like a myspace lol. this is a multi uploader you will have to edit just a little bit to make it is set to your limit and some security on it.

Processfiles.php

<?
$uploadNeed = $_POST[‘uploadNeed’];
// start for loop
for($x=0;$x<$uploadNeed;$x++){
$file_name = $_FILES[‘uploadFile’. $x][‘name’];
// strip file_name of slashes
$file_name = stripslashes($file_name);
$file_name = str_replace(“'”,“”,$file_name);
$copy = copy($_FILES[‘uploadFile’. $x][‘tmp_name’],$file_name);
// check if successfully copied
if($copy){
echo “$file_name | uploaded sucessfully!<br>”;
}else{
echo “$file_name | could not be uploaded!<br>”;
}
} // end of loop
?>

Uploadform1.php

<html>
<head>
<title># of Files to Upload</title>
<meta http-equiv=“Content-Type” content=“text/html; charset=iso-8859-1”>
</head>

<body>
<form name=“form1” method=“post” action=“uploadForm2.php”>
<p>Enter the amount of boxes you will need below. Max = 9.</p>
<p>
<input name=“uploadNeed” type=“text” id=“uploadNeed” maxlength=“1”>
</p>
<p>
<input type=“submit” name=“Submit” value=“Submit”>
</p>
</form>
</body>
</html>

Uploadform2.php

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv=“Content-Type” content=“text/html; charset=iso-8859-1”>
</head>

<body>

<form name=“form1” enctype=“multipart/form-data” method=“post” action=“processFiles.php”>
<p>
<?
// start of dynamic form
$uploadNeed = $_POST[‘uploadNeed’];
for($x=0;$x<$uploadNeed;$x++){
?>
<input name=“uploadFile<? echo $x;?>” type=“file” id=“uploadFile<? echo $x;?>”>
</p>
<?
// end of for loop
}
?>
<p><input name=“uploadNeed” type=“hidden” value=“<? echo $uploadNeed;?>”>
<input type=“submit” name=“Submit” value=“Submit”>
</p>
</form>
</body>
</html>

Hope it works for you Best of luck