ba php mikham in karo anjam bedam
masalan farz konid yek foldere temp dar wwwroo darim va har fili ra ke upload mikonim dar samte server roye in folder mishine hal yek yek modidi mikhad filaye darone temp ra onhaee ke lazem nadararo pak kone chetor mishe in karo kard ya age intori nemishe chetor mishe kole foldero pak kard aya dastore delet dare bebinid in dastore uploade
<?php include ("db.php") ?>
<?php include ("phpmkrfn.php") ?>
<?php
mysql_select_db("pari")or die("could not ");
printf("Uploaded File Details<br><br>");
printf("Name: %s <br>", $HTTP_POST_FILES["userfile"]["name"]);
printf("Temporary Name: %s <br>",
$HTTP_POST_FILES["userfile"]["tmp_name"]);
printf("Size: %s <br>", $HTTP_POST_FILES["userfile"]["size"]);
printf("Type: %s <br> <br>", $HTTP_POST_FILES["userfile"]["type"]);
if (copy($HTTP_POST_FILES["userfile"]["tmp_name"],"../temp/".$HTTP_POST_FILES["userfile"]["name"])) {
printf("File successfully copied");
} else {
printf("Error: failed to copy file");
}
$name=($HTTP_POST_FILES["userfile"]["name"]);
$query = "insert into problem values(58,'$name','rtydrt','',11)";
mysql_query($query) or die(mysql_error());
?>
hala javabamo ba tavajohe be ina bedid mersi az shoma