mobilewebcam.php 0) { $uploadfile = basename($_FILES["userfile"]["name"]); $uploadlog = basename($_POST["log"]); // optional: get log if(move_uploaded_file($_FILES["userfile"]["tmp_name"], $uploadfile)) { @chmod($uploadfile,0755); echo "Ok!"; } else echo "Error copying!"; // optional: write log file $fh = fopen("log.txt", 'w') or die("Error: Can't open log file!"); fwrite($fh, $uploadlog); fclose($fh); } ?> index.html